As we know, we can use WriteFrame to save bitmap to file in wic.
Here in the method WriteFrame,we can see a parameter ID2D1Bitmap object.When I use
m_d2dContext->CreateBitmapFromDxgiSurface(surface.Get(),&bitmapProperties,&myBitmap);
and then pass myBitmap to WriteFrame,I can't get the bitmap,it show me a black image. But when I use
m_d2dContext->CreateBitmapFromWicBitmap(pB.Get(), &m_Bitmap);
and pass m_Bitmap to WriteFrame, I can get the correct bitmap in the image file. Why this happen?
Can anyone help. Thank you.