Set pixel with the specified coordinates to the specified color.

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,
	Color color
)

Parameters

x
Type: System..::.Int32
X coordinate of the pixel to set.
y
Type: System..::.Int32
Y coordinate of the pixel to set.
color
Type: System.Drawing..::.Color
Color to set for the pixel.

Remarks

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

For grayscale images this method will calculate intensity value based on the below formula:

Copy 
0.2125 * Red + 0.7154 * Green + 0.0721 * Blue

See Also