Click or drag to resize
Accord.NET (logo)

UnmanagedImageSetPixel Method (Int32, Int32, Byte)

Set pixel with the specified coordinates to the specified value.

Namespace:  Accord.Imaging
Assembly:  Accord.Imaging (in Accord.Imaging.dll) Version: 3.6.0
public void SetPixel(
	int x,
	int y,
	byte value
Request Example View Source


Type: SystemInt32
X coordinate of the pixel to set.
Type: SystemInt32
Y coordinate of the pixel to set.
Type: SystemByte
Pixel value to set.

The method sets all color components of the pixel to the specified value. If it is a grayscale image, then pixel's intensity is set to the specified value. If it is a color image, then pixel's R/G/B components are set to the same specified value (if an image has alpha channel, then it is set to maximum value - 255 or 65535).

Note Note
For images having 16 bpp per color plane, the method extends the specified color value to 16 bit by multiplying it by 256.

See Also