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
0.2125 * Red + 0.7154 * Green + 0.0721 * Blue
public void SetPixel( int x, int y, Color color ) { SetPixel( x, y, color.R, color.G, color.B, color.A ); }
public void dessinePoint(IntPoint point, UnmanagedImage img,int nbPixel,Color col) { for (int i = point.X - nbPixel / 2; i < point.X + nbPixel / 2 + 1; i++) { for (int j = point.Y - nbPixel / 2; j < point.Y + nbPixel / 2 + 1; j++) { img.SetPixel(i, j, col); } } }