C# – I get the image reversed in C#

bitmapc++flip

this is my code to turn a byte[] array into an image

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");
  }
}

And I get this:

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

Where's the problem in the code,why that happens? How to flip it back to normal?

Best Solution

   bmp.RotateFlip(RotateFlipType.Rotate180FlipX);

Fixed the problem :)