我在C#中反转了图像

Iva*_*nov 2 c# bitmap flip

这是我将byte []数组转换为图像的代码

unsafe
{
  //convert the UInt32[] into byte array and then assign the pointer to it
  fixed (byte* ptr = Misc.ConvertFromUInt32Array(image)) 
  {
    Bitmap bmp = new Bitmap(200,64,800,
      PixelFormat.Format32bppRgb,
      new IntPtr(ptr));
    bmp.Save("test.bmp");
  }
}
Run Code Online (Sandbox Code Playgroud)

我得到了这个:

alt text http:////img11.imageshack.us/img11/4853/testacr.png

代码中的问题在哪里,为什么会发生这种情况?如何将其恢复正常?

Iva*_*nov 7

   bmp.RotateFlip(RotateFlipType.Rotate180FlipX);
Run Code Online (Sandbox Code Playgroud)

修正了问题:)