Click or drag to resize
Accord.NET (logo)

UnmanagedImageSetPixel Method (Int32, Int32, Color)

Set pixel with the specified coordinates to the specified color.

Namespace:  Accord.Imaging
Assembly:  Accord.Imaging (in Accord.Imaging.dll) Version: 3.8.0
Syntax
public void SetPixel(
	int x,
	int y,
	Color color
)
Request Example View Source

Parameters

x
Type: SystemInt32
X coordinate of the pixel to set.
y
Type: SystemInt32
Y coordinate of the pixel to set.
color
Type: System.DrawingColor
Color to set for the pixel.
Remarks

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.

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

0.2125 * Red + 0.7154 * Green + 0.0721 * Blue

See Also