WriteableBitmapExtensionsGetWritableBitmapData(WriteableBitmap, WorkingColorSpace) Method

Gets a managed write-only accessor for a WriteableBitmap 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.

Definition

Namespace: KGySoft.Drawing.WinUI
Assembly: KGySoft.Drawing.WinUI (in KGySoft.Drawing.WinUI.dll) Version: 8.1.0
C#
public static IWritableBitmapData GetWritableBitmapData(
	this WriteableBitmap bitmap,
	WorkingColorSpace workingColorSpace
)

Parameters

bitmap  WriteableBitmap
A WriteableBitmap instance, whose data is about to be accessed.
workingColorSpace  WorkingColorSpace
Specifies the preferred color space that should be used when working with the result bitmap data. Determines the WorkingColorSpace property of the result.
See the Remarks section of the WorkingColorSpace enumeration for more details.

Return Value

IWritableBitmapData
An IWritableBitmapData instance, which provides fast write-only access to the actual data of the specified bitmap.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type WriteableBitmap. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also