ImageDecoder.DecodeAsAlphaMaskEnabled Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Return whether to treat single channel input as alpha. -or- Specify whether to potentially treat the output as an alpha mask.
public bool DecodeAsAlphaMaskEnabled { [Android.Runtime.Register("isDecodeAsAlphaMaskEnabled", "()Z", "", ApiSince=28)] get; [Android.Runtime.Register("setDecodeAsAlphaMaskEnabled", "(Z)V", "", ApiSince=28)] set; }
[<get: Android.Runtime.Register("isDecodeAsAlphaMaskEnabled", "()Z", "", ApiSince=28)>]
[<set: Android.Runtime.Register("setDecodeAsAlphaMaskEnabled", "(Z)V", "", ApiSince=28)>]
member this.DecodeAsAlphaMaskEnabled : bool with get, set
Property Value
- Attributes
Remarks
Property getter documentation:
Return whether to treat single channel input as alpha.
This returns whether #setDecodeAsAlphaMaskEnabled
was set to true
. It may still return true
even if the image has more than one channel and therefore will not be treated as an alpha mask.
Java documentation for android.graphics.ImageDecoder.isDecodeAsAlphaMaskEnabled()
.
Property setter documentation:
Specify whether to potentially treat the output as an alpha mask.
If this is set to true
and the image is encoded in a format with only one channel, treat that channel as alpha. Otherwise this call has no effect.
This is incompatible with #ALLOCATOR_HARDWARE
. Trying to combine them will result in #decodeDrawable decodeDrawable
/ #decodeBitmap decodeBitmap
throwing an java.lang.IllegalStateException
.
Like all setters on ImageDecoder, this must be called inside OnHeaderDecodedListener#onHeaderDecoded onHeaderDecoded
.
Java documentation for android.graphics.ImageDecoder.setDecodeAsAlphaMaskEnabled(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.