> From: "hriday.mus...[ at ]gmail.com"
>
> > I want to convert IMediaBuffer in into Bitmap (array of
> > bytes and get a HDC) and then draw new text on that HDC
> > and convert the Bitmap (array of buyes) to IMediaBuffer.
> > And then this buffer will be pass to WM Player by
> > ProcessOutput function.
>
> AFAIK there is no way in GDI or GDI+ to create an HBITMAP or
> HDC around a pre-allocated LPBYTE.
>
> You need to allocate an in-memory HBITMAP and its HDC in
> your DSP, copy the data from the input buffer to it
> yourself, draw on the HDC, then copy from the HDC to the
> output buffer. During both copies, you will need to perform
> a line-by-line copy, taking the stride/pitch
> (((VIDEOINFOHEADER*)DMO_MEDIA_TYPE::pbFormat)->bmiHeader.biWidth)
> into account (it may be larger than the RECT specified in
> ((VIDEOINFOHEADER*)DMO_MEDIA_TYPE::pbFormat)->rcSource).
>
> --
> // Alessandro Angeli
> // MVP :: DirectShow / MediaFoundation
> // mvpnews at riseoftheants dot com
> //
http://www.riseoftheants.com/mmx/faq.htm