BitmapSourceExtensions Class

Contains extension methods for the BitmapSource type.

Definition

Namespace: KGySoft.Drawing.Wpf
Assembly: KGySoft.Drawing.Wpf (in KGySoft.Drawing.Wpf.dll) Version: 7.0.0
C#
public static class BitmapSourceExtensions
Inheritance
Object    BitmapSourceExtensions

Methods

BeginConvertPixelFormat(BitmapSource, PixelFormat, IQuantizer, IDitherer, AsyncConfig) Begins to convert the specified bitmap to a WriteableBitmap of the desired PixelFormat asynchronously.
BeginConvertPixelFormat(BitmapSource, PixelFormat, Color, Byte, AsyncConfig) Begins to convert the specified bitmap to a WriteableBitmap of the desired PixelFormat asynchronously.
BeginConvertPixelFormat(BitmapSource, PixelFormat, Color, Color, Byte, AsyncConfig) Begins to convert the specified bitmap to a WriteableBitmap of the desired PixelFormat asynchronously.
ConvertPixelFormat(BitmapSource, PixelFormat, IQuantizer, IDitherer) Converts the specified bitmap to a WriteableBitmap with the desired PixelFormat.
ConvertPixelFormat(BitmapSource, PixelFormat, Color, Byte) Converts the specified bitmap to a WriteableBitmap of the desired PixelFormat.
ConvertPixelFormat(BitmapSource, PixelFormat, Color, Color, Byte) Converts the specified bitmap to a WriteableBitmap of the desired PixelFormat.
ConvertPixelFormatAsync(BitmapSource, PixelFormat, IQuantizer, IDitherer, TaskConfig) Converts the specified bitmap to a WriteableBitmap of the desired PixelFormat asynchronously.
ConvertPixelFormatAsync(BitmapSource, PixelFormat, Color, Byte, TaskConfig) Converts the specified bitmap to a WriteableBitmap of the desired PixelFormat asynchronously.
ConvertPixelFormatAsync(BitmapSource, PixelFormat, Color, Color, Byte, TaskConfig) Converts the specified bitmap to a WriteableBitmap of the desired PixelFormat asynchronously.
EndConvertPixelFormat Waits for the pending asynchronous operation started by the BeginConvertPixelFormat methods to complete. In .NET Framework 4.0 and above you can use the ConvertPixelFormatAsync methods instead. To avoid blocking the source thread it is recommended to call this method from the CompletedCallback delegate of the asyncConfig parameter of the BeginConvertPixelFormat methods.
See the Remarks section of the BeginConvertPixelFormat(BitmapSource, PixelFormat, IQuantizer, IDitherer, AsyncConfig) method for details.
GetReadableBitmapData Gets a managed read-only accessor for a BitmapSource instance.
See the Remarks section of the BitmapExtensions.GetReadWriteBitmapData method for details and code samples. That method is for the GDI+ Bitmap type but the main principles apply for this method, too.

See Also