I want to draw a bitmap in different shades for example green. Any width and height. To begin with, let it be 5 * 5.
What i do:
pictureBox2.SizeMode = PictureBoxSizeMode.Zoom;
Bitmap this_bitmap = new Bitmap(7, 7);
Random rand = new Random();
for (int x=0;x<5;x++){
for (int y=0;y<5;y++){
this_bitmap.SetPixel(x, y,Color.FromArgb(rand.Next(0, 255), Color.Red));
}
pictureBox1.Image = this_bitmap;
I want get this:
But I get this:
On this image size bitmap 3*10
How i can get result, how it showing on the first image? Display pixels with squares.