IBitmapData Interface

KGy SOFT Drawing Libraries Help
Represents the raw data of a bitmap. To create a managed instance use the BitmapDataFactory class. To obtain a readable or writable instance for platform specific bitmaps you can either use the specific GetReadableBitmapData, GetWritableBitmapData or GetReadWriteBitmapData extension methods when applicable (see the Remarks section of the KGySoft.Drawing namespace for a list about the supported platforms). Otherwise, you can use the members of the BitmapDataFactory class to create a bitmap data for any managed or unmanaged preallocated buffer of any bitmap implementation.
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 all sources.

Namespace:  KGySoft.Drawing.Imaging
Assembly:  KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 7.0.0-preview.2
Syntax

public interface IBitmapData : IDisposable

The IBitmapData type exposes the following members.

Properties

  NameDescription
Public propertyAlphaThreshold
If this IBitmapData represents a bitmap with single bit alpha or with a palette that has a transparent color, then gets a threshold value for the Color32.A property, under which the color is considered transparent. If 0, then the pixels to be set will never be transparent.
Public propertyBackColor
When accessing pixels of indexed bitmaps, or setting pixels of bitmaps without alpha support, gets the color of the background. For example, when setting color values with alpha, which are considered opaque, they will be blended with this color before setting the pixel.
See the Remarks section of the GetReadWriteBitmapData extension method for details and examples.
Public propertyHeight
Gets the height of the current IBitmapData instance in pixels.
Public propertyIsDisposed
Gets whether this IBitmapData instance is disposed.
Public propertyPalette
Gets a Palette instance representing the colors used in this IBitmapData if PixelFormat represents an indexed format. For indexed bitmaps Indexed property of PixelFormat returns .
Public propertyPixelFormat
Gets a PixelFormatInfo of the current IBitmapData instance.
See the Remarks section for details.
Public propertyRowSize
Gets the size of a row in bytes, or zero, if this IBitmapData instance does not have an actual raw buffer to access.
See the Remarks section for details.
Public propertySize
Gets the size of the current IBitmapData instance in pixels.
Public propertyWidth
Gets the width of the current IBitmapData instance in pixels.
Top
See Also

Reference