Class BitmapExtensions
- Namespace
- PaintDotNet.Imaging
- Assembly
- PaintDotNet.Windows.Core.dll
public static class BitmapExtensions
- Inheritance
-
BitmapExtensions
- Inherited Members
Methods
- CreatePremultipliedAdapter(IBitmap<ColorBgra32>, PremultipliedAdapterOptions)
Creates an adapter that reinterprets a bitmap in a straight alpha pixel format over to a premultiplied alpha pixel format, such as from ColorBgra32 to ColorPbgra32.
The adapter can then be used for Direct2D rendering, such as with CreateBitmapDeviceContext(IBitmap, in DeviceContextProperties).
A copy is not made; the adapter references the same memory as the original bitmap.
Optionally supports conversion to premultiplied alpha on creation, and conversion back to straight alpha on disposal.