ImageDecoder.UnpremultipliedRequired Property

Definition

Return whether the Bitmap will have unpremultiplied pixels. -or- Specify whether the Bitmap should have unpremultiplied pixels.

public bool UnpremultipliedRequired { [Android.Runtime.Register("isUnpremultipliedRequired", "()Z", "", ApiSince=28)] get; [Android.Runtime.Register("setUnpremultipliedRequired", "(Z)V", "", ApiSince=28)] set; }
[<get: Android.Runtime.Register("isUnpremultipliedRequired", "()Z", "", ApiSince=28)>]
[<set: Android.Runtime.Register("setUnpremultipliedRequired", "(Z)V", "", ApiSince=28)>]
member this.UnpremultipliedRequired : bool with get, set

Property Value

Attributes

Remarks

Property getter documentation:

Return whether the Bitmap will have unpremultiplied pixels.

Java documentation for android.graphics.ImageDecoder.isUnpremultipliedRequired().

Property setter documentation:

Specify whether the Bitmap should have unpremultiplied pixels.

By default, ImageDecoder will create a Bitmap with premultiplied pixels, which is required for drawing with the android.view.View system (i.e. to a Canvas). Calling this method with a value of true will result in #decodeBitmap returning a Bitmap with unpremultiplied pixels. See Bitmap#isPremultiplied Bitmap.isPremultiplied(). This is incompatible with #decodeDrawable decodeDrawable; attempting to decode an unpremultiplied Drawable will throw an java.lang.IllegalStateException.

Like all setters on ImageDecoder, this must be called inside OnHeaderDecodedListener#onHeaderDecoded onHeaderDecoded.

Java documentation for android.graphics.ImageDecoder.setUnpremultipliedRequired(boolean).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to