IReadableBitmapDataRowGetColor Method

Gets the color of the pixel in the current row at the specified x coordinate as a Color value.


Namespace: KGySoft.Drawing.Imaging
Assembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 8.0.0-preview.1
Color GetColor(
	int x


x  Int32
The x-coordinate of the pixel to retrieve.

Return Value

A Color instance that represents the color of the specified pixel.


The returned value is a non-premultiplied color with 8 bits per channel in the sRGB color space, regardless of the underlying PixelFormat. The result of the indexer and the GetColor32 method represent the same range of colors as Color and have a slightly better performance than this method.

To access the actual PixelFormat-dependent raw value use the ReadRaw method.


ArgumentOutOfRangeExceptionx is less than zero or is greater than or equal to the Width of the parent IReadableBitmapData.

See Also