none
How to use BitmapSource.Create(IntPtr) method for bottom-up format buffer. RRS feed

  • Question


  • I have to create BitmapSource form bitmap buffer on unmanaged memory .  The bitmap buffer includes  bottom-up line format. I try to use BitmapSource.Create(Int32, Int32, Double, Double, PixelFormat, BitmapPalette, IntPtr, Int32, Int32) method, then I get  "upside-down" BitmapSource.
    How to use BitmapSource.Create(IntPtr) method for bottom-up format buffer?
    Wednesday, November 28, 2007 6:14 AM

All replies

  • Well instead of creating "bottom up" bitmap using BitmapSource.Create, how about using TransformedBitmap to rotate the "upside-down" bitmap about 180 degree to get the desired effect?

     

    Tuesday, December 4, 2007 2:01 AM
  • Thank you for your reply.

    At last, I can get collect bitmap by using TransformedBitmap. The "upside-down" bitmap is like a mirrored, so I have to use just complex matrix than 180 rorate.

    But I didn't want to use TransformedBitmap, if I could.

    Friday, December 7, 2007 2:14 PM