Guest User

Untitled

a guest
Jun 23rd, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. unsafe
  2. {
  3. //convert the UInt32[] into byte array and then assign the pointer to it
  4. fixed (byte* ptr = Misc.ConvertFromUInt32Array(image))
  5. {
  6. Bitmap bmp = new Bitmap(200,64,800,
  7. PixelFormat.Format32bppRgb,
  8. new IntPtr(ptr));
  9. bmp.Save("test.bmp");
  10. }
  11. }
  12.  
  13. bmp.RotateFlip(RotateFlipType.Rotate180FlipX);
  14.  
  15. private static Bitmap ConvertFromBytes(Byte[] imagebytes)
  16. {
  17. return new Bitmap(new MemoryStream(imagebytes));
  18. }
Add Comment
Please, Sign In to add comment