Table of Contents

Class BitmapExtensions

Namespace
PaintDotNet.Imaging
Assembly
PaintDotNet.Windows.Core.dll
public static class BitmapExtensions
Inheritance
BitmapExtensions
Inherited Members

Methods

Cast<TPixel>(IBitmap)
Cast<TPixel>(IBitmap, in PixelFormat)
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.

CreateWindow(IBitmap, RectInt32)
CreateWindow<TPixel>(IBitmap<TPixel>, RectInt32)
Lock(IBitmap, BitmapLockOptions)
Lock<TPixel>(IBitmap<TPixel>, BitmapLockOptions)