How to create a top-down IWICBitmap to use in Media Foundation RRS feed

  • Question

  • In my Windows Store app I am creating a IWICBitmap and use Direct2D to draw lines and text to this bitmap. When done I am getting a pointer to the pixels through the Lock function on the IWICBitmap. Then I call the Media Foundation function MFCopyImage in order to copy the pixels to a IMFMediaBuffer in order to create a video. But the images in the video are shown upside down. Apparantly this is because IWICBitmaps are organized bottom-up while bitmaps in Media foundation are organized top-down.
    I read that it is possible for a IWICBitmap to be organized top-down by setting the biHeight of the BITMAPINFOHEADER to a negative height. But this functionality does not seem to be available in Windows Store Apps.
    What is the recommended way of using a IWICBitmap in Media Foundation regarding this top-down / bottom-up issue in Windows Store Apps.



    Friday, January 18, 2013 11:52 AM


  • Found it. Through the IWICBitmapFlipRotator one can flip the IWICImage.


    Sunday, January 20, 2013 4:17 PM

All replies