When trying to copy a bitmap to WMP Renderer & # 8594; upside down!
I am writing a DMO video decoder and am trying to get a bitmap back to WMP rendering for display ... but WMP displays it upside down!
This is the code:
HBITMAP* hBmp = new HBITMAP();
int result;
m_pScrRenderer->CreateFrame(hBmp, &result); ///This returns the HBITMAP handle.
BITMAP bmStruct;
memset(&bmStruct, 0, sizeof(BITMAP));
GetObject(*hBmp, sizeof(BITMAP), &bmStruct);
int size = bmStruct.bmWidthBytes * bmStruct.bmHeight;
memcpy(pbOutData, bmStruct.bmBits, size); //PBoutData is WMP renderer buffer.
This creates an inverted image. What should I change in this code?
Thanks!
Roey.
+2
a source to share