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?
bmp.RotateFlip(RotateFlipType.Rotate180FlipX);
Fixed the problem :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With