Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be35c94f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Rename setAlphaFlags to setUnpremultipliedRequired"

parents 7aec354b 1be112f2
Loading
Loading
Loading
Loading
+7 −10
Original line number Diff line number Diff line
@@ -143,23 +143,20 @@ void AImageDecoder_delete(AImageDecoder* decoder) __INTRODUCED_IN(30);
int AImageDecoder_setAndroidBitmapFormat(AImageDecoder*,
        int32_t format) __INTRODUCED_IN(30);

/*
 * Choose the desired output format.
 *
 * Must be one of:
 * {@link ANDROID_BITMAP_FLAGS_ALPHA_PREMUL}
 * {@link ANDROID_BITMAP_FLAGS_ALPHA_OPAQUE}
 * {@link ANDROID_BITMAP_FLAGS_ALPHA_UNPREMUL}
/**
 * Specify whether the output's pixels should be unpremultiplied.
 *
 * Note: An OPAQUE image may be set to any of them.
 *       A non-OPAQUE image may not be set to OPAQUE
 * By default, the decoder will premultiply the pixels, if they have alpha. Pass
 * false to this method to leave them unpremultiplied. This has no effect on an
 * opaque image.
 *
 * @param required Pass true to leave the pixels unpremultiplied.
 * @return - {@link ANDROID_IMAGE_DECODER_SUCCESS} on success
 *         - {@link ANDROID_IMAGE_DECODER_INVALID_CONVERSION} if the conversion
 *           is not possible
 *         - {@link ANDROID_IMAGE_DECODER_BAD_PARAMETER} for bad parameters
 */
int AImageDecoder_setAlphaFlags(AImageDecoder*, int alphaFlags) __INTRODUCED_IN(30);
int AImageDecoder_setUnpremultipliedRequired(AImageDecoder*, bool required) __INTRODUCED_IN(30);

/**
 * Specify the output size for a decoded image.