/// <summary> ///Flip a picture to work/// </summary> /// <param name= "MYBM" >Original picture</param> /// <param name= "width" >the length of the original picture</param> /// <param name= "height" >the height of the original picture</param> /// <returns>After flipping the picture</returns> PublicBitmap revpic (Bitmap MYBM,intWidthintheight) {Bitmap BM=NewBitmap (width, height);//Initializes a recorded picture object that has been processed intX, y, Z;//x , Y is the number of cycles, and Z is used to record the change in pixelColor Pixel; for(y = height-1; Y >=0; y--) { for(x = width-1, z =0; X >=0; x--) {pixel= MYBM. GetPixel (x, y);//gets the value of the current pixelBm. SetPixel (z++, y, Color.FromArgb (pixel. R, Pixel. G, Pixel. B));//Drawing } } returnBm//returns the picture that has been flipped}
C # camera pictures are reversed, processing methods