ImageDecoderAllocator Enum
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.
Selects the requested pixel-storage allocator for image decoding.
public enum ImageDecoderAllocator
type ImageDecoderAllocator =
- Inheritance
-
ImageDecoderAllocator
Fields
| Name | Value | Description |
|---|---|---|
| Default | 0 | Use the default allocation for pixel memory. This typically produces a Hardware bitmap, but can use software for small images or when hardware is incompatible with options such as MutableRequired or DecodeAsAlphaMaskEnabled. Android reference for 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. |
| Software | 1 | Use a software allocation for the pixel memory. Useful for drawing to a software Canvas or for accessing the pixels on the final output. Android reference for 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. |
| SharedMemory | 2 | Use shared memory for the pixel memory. Useful for sharing across processes. Android reference for 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. |
| Hardware | 3 | Require a Hardware bitmap. Bitmap and non-animated drawable decoding throw IllegalStateException if this is combined with incompatible options such as MutableRequired or DecodeAsAlphaMaskEnabled. Animated drawables ignore the allocator, although drawable decoding separately rejects mutable output. Android reference for 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. |
Remarks
The choices are default, software, shared-memory, and hardware allocation. Output-format and mutability constraints still apply.