IReadableBitmapData Interface

KGy SOFT Drawing Libraries Help
Represents a readable IBitmapData instance. To create an instance use the BitmapDataFactory class or the BitmapExtensions.GetReadableBitmapData extension method.
See the Remarks section of the GetReadWriteBitmapData method for details and examples.

Namespace:  KGySoft.Drawing.Imaging
Assembly:  KGySoft.Drawing (in KGySoft.Drawing.dll) Version: 5.2.0
Syntax

public interface IReadableBitmapData : IBitmapData, 
	IDisposable

The IReadableBitmapData 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.
(Inherited from IBitmapData.)
Public propertyBackColor
When accessing pixels of indexed bitmaps, or setting pixels of bitmaps without alpha support, it gets the color of the background. For example, when setting color values with alpha, which are considered opaque the color to set 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.)
Public propertyFirstRow
Gets an IReadableBitmapDataRow 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 to obtain any row.
See the Examples section of the GetReadWriteBitmapData method for examples.
Public propertyHeight
Gets the height of the current IBitmapData instance in pixels.
(Inherited from IBitmapData.)
Public propertyItem
Gets an IReadableBitmapDataRow representing the row of the specified y coordinate in the current IReadableBitmapData.
See the Examples section of the GetReadWriteBitmapData method for examples.
Public propertyPalette
Gets a Palette instance representing the colors of the owner Bitmap if it has an indexed PixelFormat, or  if the owner Bitmap is not an indexed one. For indexed bitmaps the PixelFormat property returns Format8bppIndexed, Format4bppIndexed or Format1bppIndexed.
(Inherited from IBitmapData.)
Public propertyPixelFormat
Gets the PixelFormat of the current IBitmapData instance.
See the Remarks section for details.
(Inherited from IBitmapData.)
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. Otherwise, RowSize is similar to BitmapData.Stride but this property never returns a negative value.
See the Remarks section for details.
(Inherited from IBitmapData.)
Public propertyWidth
Gets the width of the current IBitmapData instance in pixels.
(Inherited from IBitmapData.)
Top
Methods

  NameDescription
Public methodGetPixel
Gets the color of the pixel at the specified coordinates.
See the Remarks section for details.
Top
Extension Methods

  NameDescription
Public Extension MethodClip
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.
See the Remarks section for details.
(Defined by BitmapDataExtensions.)
Public Extension MethodCloneOverloaded.
Gets the clone of the specified source with identical size and pixel format.
(Defined by BitmapDataExtensions.)
Public Extension MethodClone(PixelFormat, Palette)Overloaded.
Gets the clone of the specified source with identical size and the specified pixelFormat and palette. This method is similar to ConvertPixelFormat(Image, PixelFormat, Color, Color, Byte) but as the result is a managed IReadWriteBitmapData instance every PixelFormat is supported on any platform.
See the Remarks section for details.
(Defined by BitmapDataExtensions.)
Public Extension MethodClone(PixelFormat, IDitherer)Overloaded.
Gets the clone of the specified source with identical size and the specified pixelFormat, using an optional ditherer. This method is similar to ConvertPixelFormat(Image, PixelFormat, IQuantizer, IDitherer) but as the result is a managed IReadWriteBitmapData instance every PixelFormat is supported on any platform.
See the Remarks section for details.
(Defined by BitmapDataExtensions.)
Public Extension MethodClone(PixelFormat, Color32, Byte)Overloaded.
Gets the clone of the specified source with identical size and the specified pixelFormat and color settings. This method is similar to ConvertPixelFormat(Image, PixelFormat, Color, Color, Byte) but as the result is a managed IReadWriteBitmapData instance every PixelFormat is supported on any platform.
See the Remarks section for details.
(Defined by BitmapDataExtensions.)
Public Extension MethodClone(Rectangle, PixelFormat, Palette)Overloaded.
Gets the clone of the specified portion of source with the specified pixelFormat and palette. This method is similar to ConvertPixelFormat(Image, PixelFormat, Color, Color, Byte) but as the result is a managed IReadWriteBitmapData instance every PixelFormat is supported on any platform.
See the Remarks section for details.
(Defined by BitmapDataExtensions.)
Public Extension MethodClone(PixelFormat, IQuantizer, IDitherer)Overloaded.
Gets the clone of the specified source with identical size and the specified pixelFormat, using an optional quantizer and ditherer. This method is similar to ConvertPixelFormat(Image, PixelFormat, IQuantizer, IDitherer) but as the result is a managed IReadWriteBitmapData instance every PixelFormat is supported on any platform.
See the Remarks section for details.
(Defined by BitmapDataExtensions.)
Public Extension MethodClone(Rectangle, PixelFormat, IDitherer)Overloaded.
Gets the clone of the specified portion of source with the specified pixelFormat, using an optional ditherer. This method is similar to ConvertPixelFormat(Image, PixelFormat, IQuantizer, IDitherer) but as the result is a managed IReadWriteBitmapData instance every PixelFormat is supported on any platform.
See the Remarks section for details.
(Defined by BitmapDataExtensions.)
Public Extension MethodClone(Rectangle, PixelFormat, Color32, Byte)Overloaded.
Gets the clone of the specified portion of source with the specified pixelFormat and color settings. This method is similar to ConvertPixelFormat(Image, PixelFormat, Color, Color, Byte) but as the result is a managed IReadWriteBitmapData instance every PixelFormat is supported on any platform.
See the Remarks section for details.
(Defined by BitmapDataExtensions.)
Public Extension MethodClone(Rectangle, PixelFormat, IQuantizer, IDitherer)Overloaded.
Gets the clone of the specified portion of source with the specified pixelFormat, using an optional quantizer and ditherer. This method is similar to ConvertPixelFormat(Image, PixelFormat, IQuantizer, IDitherer) but as the result is a managed IReadWriteBitmapData instance every PixelFormat is supported on any platform.
See the Remarks section for details.
(Defined by BitmapDataExtensions.)
Public Extension MethodCopyTo(IWritableBitmapData, Point, IDitherer)Overloaded.
Copies the source IReadableBitmapData into the target IWritableBitmapData without scaling and blending. This method works between any pair of source and target PixelFormats and supports quantizing and dithering. To draw a bitmap data into another one with blending use the DrawInto methods instead.
See the Remarks section for details.
(Defined by BitmapDataExtensions.)
Public Extension MethodCopyTo(IWritableBitmapData, Point, IQuantizer, IDitherer)Overloaded.
Copies the source IReadableBitmapData into the target IWritableBitmapData without scaling and blending. This method works between any pair of source and target PixelFormats and supports quantizing and dithering. To draw a bitmap data into another one with blending use the DrawInto methods instead.
See the Remarks section for details.
(Defined by BitmapDataExtensions.)
Public Extension MethodCopyTo(IWritableBitmapData, Rectangle, Point, IDitherer)Overloaded.
Copies the source IReadableBitmapData into the target IWritableBitmapData without scaling and blending. This method works between any pair of source and target PixelFormats and supports quantizing and dithering. To draw a bitmap data into another one with blending use the DrawInto methods instead.
See the Remarks section for details.
(Defined by BitmapDataExtensions.)
Public Extension MethodCopyTo(IWritableBitmapData, Rectangle, Point, IQuantizer, IDitherer)Overloaded.
Copies the source IReadableBitmapData into the target IWritableBitmapData without scaling and blending. This method works between any pair of source and target PixelFormats and supports quantizing and dithering. To draw a bitmap data into another one with blending use the DrawInto methods instead.
See the Remarks section for details.
(Defined by BitmapDataExtensions.)
Public Extension MethodDrawInto(IReadWriteBitmapData, Point, IDitherer)Overloaded.
Draws the source IReadableBitmapData into the target IReadWriteBitmapData without scaling, using blending. This method is similar to Graphics.DrawImage methods, except that this one always preserves the source size in pixels, works between any pair of source and target PixelFormats 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.
See the Remarks section for details.
(Defined by BitmapDataExtensions.)
Public Extension MethodDrawInto(IReadWriteBitmapData, Rectangle, ScalingMode)Overloaded.
Draws the source IReadableBitmapData into the target IReadWriteBitmapData using scaling and blending. This method is similar to Graphics.DrawImage methods, except that this one works between any pair of source and target PixelFormats and supports quantizing. To copy a bitmap data into another one without blending use the CopyTo methods instead.
See the Remarks section for details.
(Defined by BitmapDataExtensions.)
Public Extension MethodDrawInto(IReadWriteBitmapData, Point, IQuantizer, IDitherer)Overloaded.
Draws the source IReadableBitmapData into the target IReadWriteBitmapData without scaling, using blending. This method is similar to Graphics.DrawImage methods, except that this one always preserves the source size in pixels, works between any pair of source and target PixelFormats 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.
See the Remarks section for details.
(Defined by BitmapDataExtensions.)
Public Extension MethodDrawInto(IReadWriteBitmapData, Rectangle, Point, IDitherer)Overloaded.
Draws the source IReadableBitmapData into the target IReadWriteBitmapData without scaling, using blending. This method is similar to Graphics.DrawImage methods, except that this one always preserves the source size in pixels, works between any pair of source and target PixelFormats 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.
See the Remarks section for details.
(Defined by BitmapDataExtensions.)
Public Extension MethodDrawInto(IReadWriteBitmapData, Rectangle, IDitherer, ScalingMode)Overloaded.
Draws the source IReadableBitmapData into the target IReadWriteBitmapData using scaling and blending. This method is similar to Graphics.DrawImage methods, except that this one works between any pair of source and target PixelFormats and supports quantizing and dithering. To copy a bitmap data into another one without blending use the CopyTo methods instead.
See the Remarks section for details.
(Defined by BitmapDataExtensions.)
Public Extension MethodDrawInto(IReadWriteBitmapData, Rectangle, Rectangle, ScalingMode)Overloaded.
Draws the source IReadableBitmapData into the target IReadWriteBitmapData using scaling and blending. This method is similar to Graphics.DrawImage methods, except that this one works between any pair of source and target PixelFormats and supports quantizing. To copy a bitmap data into another one without blending use the CopyTo methods instead.
See the Remarks section for details.
(Defined by BitmapDataExtensions.)
Public Extension MethodDrawInto(IReadWriteBitmapData, Rectangle, Point, IQuantizer, IDitherer)Overloaded.
Draws the source IReadableBitmapData into the target IReadWriteBitmapData without scaling, using blending. This method is similar to Graphics.DrawImage methods, except that this one always preserves the source size in pixels, works between any pair of source and target PixelFormats 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.
See the Remarks section for details.
(Defined by BitmapDataExtensions.)
Public Extension MethodDrawInto(IReadWriteBitmapData, Rectangle, IQuantizer, IDitherer, ScalingMode)Overloaded.
Draws the source IReadableBitmapData into the target IReadWriteBitmapData using scaling and blending. This method is similar to Graphics.DrawImage methods, except that this one works between any pair of source and target PixelFormats and supports quantizing and dithering. To copy a bitmap data into another one without blending use the CopyTo methods instead.
See the Remarks section for details.
(Defined by BitmapDataExtensions.)
Public Extension MethodDrawInto(IReadWriteBitmapData, Rectangle, Rectangle, IDitherer, ScalingMode)Overloaded.
Draws the source IReadableBitmapData into the target IReadWriteBitmapData using scaling and blending. This method is similar to Graphics.DrawImage methods, except that this one works between any pair of source and target PixelFormats and supports quantizing and dithering. To copy a bitmap data into another one without blending use the CopyTo methods instead.
See the Remarks section for details.
(Defined by BitmapDataExtensions.)
Public Extension MethodDrawInto(IReadWriteBitmapData, Rectangle, Rectangle, IQuantizer, IDitherer, ScalingMode)Overloaded.
Draws the source IReadableBitmapData into the target IReadWriteBitmapData using scaling and blending. This method is similar to Graphics.DrawImage methods, except that this one works between any pair of source and target PixelFormats and supports quantizing and dithering. To copy a bitmap data into another one without blending use the CopyTo methods instead.
See the Remarks section for details.
(Defined by BitmapDataExtensions.)
Public Extension MethodGetColorCount
Gets the actual number of colors of the specified bitmapData. Colors are counted even for indexed bitmaps.
See the Remarks section for details.
(Defined by BitmapDataExtensions.)
Public Extension MethodGetColors
Gets the colors used in the specified bitmapData. A limit can be defined in maxColors.
See the Remarks section for details.
(Defined by BitmapDataExtensions.)
Public Extension MethodToBitmap
Converts the specified source to a Bitmap.
See the Remarks section for details.
(Defined by BitmapDataExtensions.)
Public Extension MethodToGrayscale
Returns a new IReadWriteBitmapData, which is the grayscale version of the specified bitmapData.
See the Remarks section for details.
(Defined by BitmapDataExtensions.)
Public Extension MethodToTransparentOverloaded.
Returns a new IReadWriteBitmapData, which is the clone of the specified bitmapData with transparent background.
See the Remarks section for details.
(Defined by BitmapDataExtensions.)
Public Extension MethodToTransparent(Color32)Overloaded.
Returns a new IReadWriteBitmapData, which is the clone of the specified bitmapData with transparent background.
See the Remarks section for details.
(Defined by BitmapDataExtensions.)
Top
See Also

Reference