best way to draw in c# windows pixel by pixel code example
Example: c# windows forms draw pixel
private void SetPixel_Example(PaintEventArgs e)
{
Bitmap myBitmap = new Bitmap("Grapes.jpg");
e.Graphics.DrawImage(myBitmap, 0, 0, myBitmap.Width,
myBitmap.Height);
for (int Xcount = 0; Xcount < myBitmap.Width; Xcount++)
{
for (int Ycount = 0; Ycount < myBitmap.Height; Ycount++)
{
myBitmap.SetPixel(Xcount, Ycount, Color.Black);
}
}
e.Graphics.DrawImage(myBitmap, myBitmap.Width, 0,
myBitmap.Width, myBitmap.Height);
}