Color c=new Color();
Bitmap box1=new Bitmap(pictureBox1.Image);
Bitmap box2=new Bitmap(pictureBox2.Image);
int r,g,b,i,j,k1,k2,size,xres,yres;
xres=pictureBox1.Image.Width;
yres=pictureBox1.Image.Height;
size=2;
for(i=0;i<=xres-1;i+=size)
{
for(j=0;j<=yres-1;j+=size)
{
c=box1.GetPixel(i,j);
r=c.R;g=c.G;b=c.B;
Color cc=Color.FromArgb(r,g,b);
for(k1=0;k1<=size-1;k1++)
for(k2=0;k2<=size-1;k2++)
box2.SetPixel(i+k1,j+k2,cc);
}
}
pictureBox2.Refresh();
pictureBox2.Image=box2;
Bitmap box1=new Bitmap(pictureBox1.Image);
Bitmap box2=new Bitmap(pictureBox2.Image);
int r,g,b,i,j,k1,k2,size,xres,yres;
xres=pictureBox1.Image.Width;
yres=pictureBox1.Image.Height;
size=2;
for(i=0;i<=xres-1;i+=size)
{
for(j=0;j<=yres-1;j+=size)
{
c=box1.GetPixel(i,j);
r=c.R;g=c.G;b=c.B;
Color cc=Color.FromArgb(r,g,b);
for(k1=0;k1<=size-1;k1++)
for(k2=0;k2<=size-1;k2++)
box2.SetPixel(i+k1,j+k2,cc);
}
}
pictureBox2.Refresh();
pictureBox2.Image=box2;