IReadableBitmapData Interface

Represents a readable IBitmapData instance. To create an instance use the BitmapDataFactory class or the GetReadableBitmapData extension methods for various platform dependent bitmap implementations.
See the Remarks section of the KGySoft.Drawing namespace for a list about the technologies with dedicated support.
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.

Definition

Namespace: KGySoft.Drawing.Imaging
Assembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 7.0.0-preview.3
C#
public interface IReadableBitmapData : IBitmapData, 
	IDisposable
Implements
IBitmapData, IDisposable

Properties

AlphaThreshold 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.
(Inherited from IBitmapData)
BackColor 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.
(Inherited from IBitmapData)
FirstRow Gets an IReadableBitmapDataRowMovable instance representing the first row of the current IReadableBitmapData. Subsequent rows can be accessed by calling the MoveNextRow method on the returned instance while it returns . Alternatively, you can use the indexer or the GetMovableRow method to obtain any row.
See the Examples section of the GetReadWriteBitmapData method for examples.
Height Gets the height of the current IBitmapData instance in pixels.
(Inherited from IBitmapData)
IsDisposed Gets whether this IBitmapData instance is disposed.
(Inherited from IBitmapData)
Item Gets an IReadableBitmapDataRow representing the row of the specified y coordinate in the current IReadableBitmapData. When obtaining the same row repeatedly, then a cached instance is returned. To get a movable row use the GetMovableRow method instead.
See the Examples section of the GetReadWriteBitmapData method for examples.
Palette 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 .
(Inherited from IBitmapData)
PixelFormat Gets a PixelFormatInfo of the current IBitmapData instance.
(Inherited from IBitmapData)
RowSize Gets the size of a row in bytes, or zero, if this IBitmapData instance does not have an actual raw buffer to access.
(Inherited from IBitmapData)
Size Gets the size of the current IBitmapData instance in pixels.
(Inherited from IBitmapData)
Width Gets the width of the current IBitmapData instance in pixels.
(Inherited from IBitmapData)

Methods

GetColor32 Gets the color of the pixel at the specified coordinates as a Color32 value.
See the Remarks section of the GetPixel method for details.
GetMovableRow Gets an IReadableBitmapDataRowMovable instance representing the row of the specified y coordinate in the current IReadableBitmapData. Unlike the indexer, this method always allocates a new instance.
GetPixel Gets the color of the pixel at the specified coordinates.

Extension Methods

BeginClone Begins to clone the specified source with identical size asynchronously.
(Defined by BitmapDataExtensions)
BeginClone Begins to clone the specified portion of the specified source asynchronously.
(Defined by BitmapDataExtensions)
BeginClone Begins to clone the specified portion of source with the specified pixelFormat and palette asynchronously.
(Defined by BitmapDataExtensions)
BeginClone Begins to clone the specified portion of source with the specified pixelFormat and color settings asynchronously.
(Defined by BitmapDataExtensions)
BeginClone Begins to clone the specified portion of source with the specified pixelFormat, using an optional quantizer and ditherer asynchronously.
(Defined by BitmapDataExtensions)
BeginCopyTo Begins to copy the source IReadableBitmapData into the target IWritableBitmapData asynchronously, without scaling and blending. This method works between any pair of source and target KnownPixelFormats and supports quantizing and dithering. To draw a bitmap data into another one with blending use the BeginDrawInto methods instead.
(Defined by BitmapDataExtensions)
BeginDrawInto Begins to draw the source IReadableBitmapData into the target IReadWriteBitmapData asynchronously, without scaling, using blending. This method always preserves the source size in pixels, works between any pair of source and target KnownPixelFormats and supports quantizing and dithering. For scaling use the BeginDrawInto(IReadableBitmapData, IReadWriteBitmapData, Rectangle, Rectangle, IQuantizer, IDitherer, ScalingMode, AsyncConfig) overload. To copy a bitmap data into another one without blending use the BeginCopyTo method instead.
(Defined by BitmapDataExtensions)
BeginDrawInto Begins to draw the source IReadableBitmapData into the target IReadWriteBitmapData asynchronously, using scaling and blending. This method works between any pair of source and target KnownPixelFormats and supports quantizing and dithering. To copy a bitmap data into another one without blending use the BeginCopyTo method instead.
(Defined by BitmapDataExtensions)
BeginGetColorCount Gets the actual number of colors of the specified bitmapData asynchronously. Colors are counted even for indexed bitmaps.
(Defined by BitmapDataExtensions)
BeginGetColors Begins to get the colors used in the specified bitmapData asynchronously. A limit can be defined in maxColors.
(Defined by BitmapDataExtensions)
BeginResize Begins to resize the specified source asynchronously.
(Defined by BitmapDataExtensions)
BeginSave Begins to save the content of this bitmapData into the specified stream asynchronously.
(Defined by BitmapDataExtensions)
BeginToBitmap Begins to convert the specified source to a Bitmap asynchronously.
(Defined by ReadableBitmapDataExtensions)
BeginToBitmap Begins to convert the specified source to a Bitmap with a specific PixelFormat asynchronously.
(Defined by ReadableBitmapDataExtensions)
BeginToGrayscale Begins to convert the specified bitmapData to grayscale asynchronously.
(Defined by BitmapDataExtensions)
BeginToTransparent Begins to convert the specified bitmapData to another one with transparent background asynchronously.
(Defined by BitmapDataExtensions)
BeginToTransparent Begins to convert the specified bitmapData to another one with transparent background asynchronously.
(Defined by BitmapDataExtensions)
BeginToWriteableBitmap Begins to convert the specified source to a WriteableBitmap asynchronously.
(Defined by ReadableBitmapDataExtensions)
BeginToWriteableBitmap Begins to convert the specified source to a WriteableBitmap with a specific PixelFormat asynchronously.
(Defined by ReadableBitmapDataExtensions)
Clip Clips the specified source using the specified clippingRegion. Unlike the Clone methods, this one returns a wrapper, providing access only to the specified region of the original source. This overload does not dispose source when the result is disposed.
See the Remarks section of the Clip(IReadableBitmapData, Rectangle, Boolean) overload for details.
(Defined by BitmapDataExtensions)
Clip Clips the specified source using the specified clippingRegion. Unlike the Clone methods, this one returns a wrapper, providing access only to the specified region of the original source.
(Defined by BitmapDataExtensions)
Clone Gets the clone of the specified source with identical size.
(Defined by BitmapDataExtensions)
Clone Gets the clone of the specified portion of source.
(Defined by BitmapDataExtensions)
Clone Gets the clone of the specified portion of source inside of an already created, possibly asynchronous context.
(Defined by BitmapDataExtensions)
Clone Gets the clone of the specified source with identical size and the specified pixelFormat and palette.
(Defined by BitmapDataExtensions)
Clone Gets the clone of the specified source with identical size and the specified pixelFormat, using an optional ditherer.
(Defined by BitmapDataExtensions)
Clone Gets the clone of the specified source with identical size and the specified pixelFormat and color settings.
(Defined by BitmapDataExtensions)
Clone Gets the clone of the specified source with identical size and the specified pixelFormat, using an optional quantizer and ditherer.
(Defined by BitmapDataExtensions)
Clone Gets the clone of the specified portion of source with the specified pixelFormat and palette.
(Defined by BitmapDataExtensions)
Clone Gets the clone of the specified portion of source with the specified pixelFormat, using an optional ditherer.
(Defined by BitmapDataExtensions)
Clone Gets the clone of the specified portion of source with the specified pixelFormat and palette inside of an already created, possibly asynchronous context.
(Defined by BitmapDataExtensions)
Clone Gets the clone of the specified portion of source with the specified pixelFormat and color settings.
(Defined by BitmapDataExtensions)
Clone Gets the clone of the specified portion of source with the specified pixelFormat, using an optional quantizer and ditherer.
(Defined by BitmapDataExtensions)
Clone Gets the clone of the specified portion of source with the specified pixelFormat and color settings inside of an already created, possibly asynchronous context.
(Defined by BitmapDataExtensions)
Clone Gets the clone of the specified portion of source with the specified pixelFormat, using an optional quantizer and ditherer inside of an already created, possibly asynchronous context.
(Defined by BitmapDataExtensions)
CloneAsync Gets the clone of the specified source with identical size asynchronously.
(Defined by BitmapDataExtensions)
CloneAsync Gets the clone of the specified portion of the specified source asynchronously.
(Defined by BitmapDataExtensions)
CloneAsync Gets the clone of the specified portion of source with the specified pixelFormat and palette asynchronously.
(Defined by BitmapDataExtensions)
CloneAsync Gets the clone of the specified portion of source with the specified pixelFormat and color settings asynchronously.
(Defined by BitmapDataExtensions)
CloneAsync Gets the clone of the specified portion of source with the specified pixelFormat, using an optional quantizer and ditherer asynchronously.
(Defined by BitmapDataExtensions)
CopyTo Copies the source IReadableBitmapData into the target IWritableBitmapData without scaling and blending. This method works between any pair of source and target KnownPixelFormats and supports quantizing and dithering. To draw a bitmap data into another one with blending use the DrawInto methods instead.
(Defined by BitmapDataExtensions)
CopyTo Copies the source IReadableBitmapData into the target IWritableBitmapData without scaling and blending. This method works between any pair of source and target KnownPixelFormats and supports quantizing and dithering. To draw a bitmap data into another one with blending use the DrawInto methods instead.
(Defined by BitmapDataExtensions)
CopyTo Copies the source IReadableBitmapData into the target IWritableBitmapData without scaling and blending. This method works between any pair of source and target KnownPixelFormats and supports quantizing and dithering. To draw a bitmap data into another one with blending use the DrawInto methods instead.
(Defined by BitmapDataExtensions)
CopyTo Copies the source IReadableBitmapData into the target IWritableBitmapData without scaling and blending. This method works between any pair of source and target KnownPixelFormats and supports quantizing and dithering. To draw a bitmap data into another one with blending use the DrawInto methods instead.
(Defined by BitmapDataExtensions)
CopyTo Copies the source IReadableBitmapData into the target IWritableBitmapData without scaling and blending, inside of an already created, possibly asynchronous context.
(Defined by BitmapDataExtensions)
CopyToAsync Copies the source IReadableBitmapData into the target IWritableBitmapData asynchronously, without scaling and blending. This method works between any pair of source and target KnownPixelFormats and supports quantizing and dithering. To draw a bitmap data into another one with blending use the DrawIntoAsync methods instead.
(Defined by BitmapDataExtensions)
DrawInto Draws the source IReadableBitmapData into the target IReadWriteBitmapData without scaling, using blending. This method always preserves the source size in pixels, works between any pair of source and target KnownPixelFormats and supports quantizing and dithering. For scaling use the overloads with targetRectangle and ScalingMode parameters. To copy a bitmap data into another one without blending use the CopyTo methods instead.
(Defined by BitmapDataExtensions)
DrawInto Draws the source IReadableBitmapData into the target IReadWriteBitmapData using scaling and blending. This method works between any pair of source and target KnownPixelFormats and supports quantizing. To copy a bitmap data into another one without blending use the CopyTo methods instead.
(Defined by BitmapDataExtensions)
DrawInto Draws the source IReadableBitmapData into the target IReadWriteBitmapData without scaling, using blending. This method always preserves the source size in pixels, works between any pair of source and target KnownPixelFormats and supports quantizing and dithering. For scaling use the overloads with targetRectangle and ScalingMode parameters. To copy a bitmap data into another one without blending use the CopyTo methods instead.
(Defined by BitmapDataExtensions)
DrawInto Draws the source IReadableBitmapData into the target IReadWriteBitmapData without scaling, using blending. This method always preserves the source size in pixels, works between any pair of source and target KnownPixelFormats and supports quantizing and dithering. For scaling use the overloads with targetRectangle and ScalingMode parameters. To copy a bitmap data into another one without blending use the CopyTo methods instead.
(Defined by BitmapDataExtensions)
DrawInto Draws the source IReadableBitmapData into the target IReadWriteBitmapData using scaling and blending. This method works between any pair of source and target KnownPixelFormats and supports quantizing and dithering. To copy a bitmap data into another one without blending use the CopyTo methods instead.
(Defined by BitmapDataExtensions)
DrawInto Draws the source IReadableBitmapData into the target IReadWriteBitmapData using scaling and blending. This method works between any pair of source and target KnownPixelFormats and supports quantizing. To copy a bitmap data into another one without blending use the CopyTo methods instead.
(Defined by BitmapDataExtensions)
DrawInto Draws the source IReadableBitmapData into the target IReadWriteBitmapData without scaling, using blending. This method always preserves the source size in pixels, works between any pair of source and target KnownPixelFormats and supports quantizing and dithering. For scaling use the overloads with targetRectangle and ScalingMode parameters. To copy a bitmap data into another one without blending use the CopyTo methods instead.
(Defined by BitmapDataExtensions)
DrawInto Draws the source IReadableBitmapData into the target IReadWriteBitmapData using scaling and blending. This method works between any pair of source and target KnownPixelFormats and supports quantizing and dithering. To copy a bitmap data into another one without blending use the CopyTo methods instead.
(Defined by BitmapDataExtensions)
DrawInto Draws the source IReadableBitmapData into the target IReadWriteBitmapData using scaling and blending. This method works between any pair of source and target KnownPixelFormats and supports quantizing and dithering. To copy a bitmap data into another one without blending use the CopyTo methods instead.
(Defined by BitmapDataExtensions)
DrawInto Draws the source IReadableBitmapData into the target IReadWriteBitmapData without scaling, using blending inside of an already created, possibly asynchronous context.
(Defined by BitmapDataExtensions)
DrawInto Draws the source IReadableBitmapData into the target IReadWriteBitmapData using scaling and blending. This method works between any pair of source and target KnownPixelFormats and supports quantizing and dithering. To copy a bitmap data into another one without blending use the CopyTo methods instead.
(Defined by BitmapDataExtensions)
DrawInto Draws the source IReadableBitmapData into the target IReadWriteBitmapData using scaling and blending, inside of an already created, possibly asynchronous context.
(Defined by BitmapDataExtensions)
DrawIntoAsync Draws the source IReadableBitmapData into the target IReadWriteBitmapData asynchronously, without scaling, using blending. This method always preserves the source size in pixels, works between any pair of source and target KnownPixelFormats and supports quantizing and dithering. For scaling use the DrawIntoAsync(IReadableBitmapData, IReadWriteBitmapData, Rectangle, Rectangle, IQuantizer, IDitherer, ScalingMode, TaskConfig) overload. To copy a bitmap data into another one without blending use the CopyToAsync method instead.
(Defined by BitmapDataExtensions)
DrawIntoAsync Draws the source IReadableBitmapData into the target IReadWriteBitmapData asynchronously, using scaling and blending. This method works between any pair of source and target KnownPixelFormats and supports quantizing and dithering. To copy a bitmap data into another one without blending use the CopyToAsync method instead.
(Defined by BitmapDataExtensions)
GetColorCount Gets the actual number of colors of the specified bitmapData. Colors are counted even for indexed bitmaps.
(Defined by BitmapDataExtensions)
GetColorCountAsync Gets the actual number of colors of the specified bitmapData asynchronously. Colors are counted even for indexed bitmaps.
(Defined by BitmapDataExtensions)
GetColors Gets the colors used in the specified bitmapData. A limit can be defined in maxColors.
(Defined by BitmapDataExtensions)
GetColorsAsync Gets the colors used in the specified bitmapData asynchronously. A limit can be defined in maxColors.
(Defined by BitmapDataExtensions)
Resize Resizes the specified source. The result always has a Format32bppPArgb pixel format.
(Defined by BitmapDataExtensions)
ResizeAsync Resizes the specified source asynchronously.
(Defined by BitmapDataExtensions)
Save Saves the content of this bitmapData into the specified stream.
(Defined by BitmapDataExtensions)
SaveAsync Saves the content of this bitmapData into the specified stream asynchronously.
(Defined by BitmapDataExtensions)
ToBitmap Converts the specified source to a Bitmap.
(Defined by ReadableBitmapDataExtensions)
ToBitmap Converts the specified source to a Bitmap that has the specified PixelFormat.
(Defined by ReadableBitmapDataExtensions)
ToBitmapAsync Converts the specified source to a Bitmap asynchronously.
(Defined by ReadableBitmapDataExtensions)
ToBitmapAsync Converts the specified source to a Bitmap asynchronously.
(Defined by ReadableBitmapDataExtensions)
ToGrayscale Returns a new IReadWriteBitmapData, which is the grayscale version of the specified bitmapData.
(Defined by BitmapDataExtensions)
ToTransparent Returns a new IReadWriteBitmapData, which is the clone of the specified bitmapData with transparent background.
(Defined by BitmapDataExtensions)
ToTransparent Returns a new IReadWriteBitmapData, which is the clone of the specified bitmapData with transparent background.
(Defined by BitmapDataExtensions)
ToTransparentAsync Returns a new IReadWriteBitmapData asynchronously, which is the clone of the specified bitmapData with transparent background.
(Defined by BitmapDataExtensions)
ToTransparentAsync Returns a new IReadWriteBitmapData asynchronously, which is the clone of the specified bitmapData with transparent background.
(Defined by BitmapDataExtensions)
ToWriteableBitmap Converts the specified source to a WriteableBitmap.
(Defined by ReadableBitmapDataExtensions)
ToWriteableBitmap Converts the specified source to a WriteableBitmap.
(Defined by ReadableBitmapDataExtensions)
ToWriteableBitmap Converts the specified source to a WriteableBitmap using an optionally specified quantizer and ditherer.
(Defined by ReadableBitmapDataExtensions)
ToWriteableBitmap Converts the specified source to a WriteableBitmap that has the specified PixelFormat.
(Defined by ReadableBitmapDataExtensions)
ToWriteableBitmapAsync Converts the specified source to a WriteableBitmap asynchronously.
(Defined by ReadableBitmapDataExtensions)
ToWriteableBitmapAsync Converts the specified source to a WriteableBitmap asynchronously.
(Defined by ReadableBitmapDataExtensions)
ToWriteableBitmapAsync Converts the specified source to a WriteableBitmap asynchronously, using an optionally specified quantizer and ditherer.
(Defined by ReadableBitmapDataExtensions)
ToWriteableBitmapAsync Converts the specified source to a WriteableBitmap asynchronously.
(Defined by ReadableBitmapDataExtensions)

See Also