Enum BitmapImageOptions
- Namespace
- PaintDotNet.Direct2D1
- Assembly
- PaintDotNet.Windows.Framework.dll
[Flags]
public enum BitmapImageOptions
Fields
Default = 0
The default option, which selects an appropriate image creation strategy based on how large the bitmap is, whether it is an IBitmapSource or IBitmap, the amount of available GPU memory, and whether the device context is using hardware or software rendering.
Depending on which strategy is used to create the image for the device context, the bitmap may be copied to the to the GPU (cached), or streamed during rendering.
The bitmap's colors will be converted to the color space of the device context, if available and if possible, unless the DisableColorSpaceConversion option is specified.
The image will use premultiplied alpha unless the UseStraightAlpha option is specified. The bitmap will be premultiplied or unpremultiplied as necessary.
NOTE: The bitmap should not be modified after the image is created in order to guarantee correct rendering results. If the bitmap is modified after the image is created, results are undefined.DoNotCache = 1
The source bitmap is not copied to the GPU. Instead, it is streamed on-demand as portions of it are needed for rendering. If the same portion of the bitmap is rendered multiple times, it will be streamed again. No caching is used.
UseStraightAlpha = 2
This option ensures that the image uses straight alpha instead of premultiplied alpha. If the bitmap is in a premultiplied alpha format then it will be unpremultiplied. If the bitmap is in a straight alpha format then it will not be premultiplied.
DisableColorSpaceConversion = 4
Use this option to prevent the image from being converted to the device context's color space. This is usually only needed for advanced scenarios where you are performing your own color management.