Set pixel with the specified coordinates to the specified value.

Namespace:  AForge.Imaging
Assembly:  AForge.Imaging (in AForge.Imaging.dll) Version: 2.2.5.0 (2.2.5.0)

Syntax

C#
public void SetPixel(
	int x,
	int y,
	byte value
)

Parameters

x
Type: System..::.Int32
X coordinate of the pixel to set.
y
Type: System..::.Int32
Y coordinate of the pixel to set.
value
Type: System..::.Byte
Pixel value to set.

Remarks

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: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