There is no efficiency at all. It is completely a solution to the problem,
Bitmap BMP = new Bitmap (320,240, pixelformat. format24bpprgb );
Bitmap BMP 1 = new Bitmap ("C: \ aa.bmp ");
For (INT I = 1; I <240; I ++)
{
For (Int J; j <320; j ++)
{
BMP. setpixel (J, I, BMP. getpixel (J, I );
}
}
BMP. Save ("D: \ cc.bmp", system. Drawing. imaging. imageformat. BMP );
Find a new method, thanks to csdn netizen -------------> http://topic.csdn.net/t/20050226/10/3807935.html
Way 1:
1 bitmap BMP 1 = new Bitmap ("C: \ aa.bmp ");
2 bitmapdata BD = BMP 1.lockbits (New rectangle (0, 0, BMP 1.width, BMP 1.height), imagelockmode. readonly, pixelformat. format24bpprgb );
3 bitmap BMP = new Bitmap (BMP 1.width, BMP 1.height, Bd. stride, Bd. pixelformat, Bd. scan0 );
4 BMP. Save ("D: \ mm.bmp", system. Drawing. imaging. imageformat. BMP );
5 BMP 1.unlockbits (BD );
Way 2:
1 bitmap BMP 1 = new Bitmap ("C: \ aa.bmp ");
2 bitmapdata BD = BMP 1.lockbits (New rectangle (0, 0, BMP 1.width, BMP 1.height), imagelockmode. readwrite, pixelformat. format24bpprgb );
3 bitmap BMP = BMP 1.clone (New rectangle (0, 0, BMP 1.width, BMP 1.height), Bd. pixelformat );
4 BMP. Save ("D: \ hh.bmp", system. Drawing. imaging. imageformat. BMP );
5 BMP 1.unlockbits (BD );
BMP resource processing ..........