A program I am modifying converts EMF files to a different format (SVG). It does this with EnumEnhMetaFile() which calls the program's parsing routine for each record of the EMF. That works great for the vector stuff. However, it also needs to be able to pull out a bitmap when it hits an EMR_STRETCHDIBITS. (The final target is actually a base64 encoded PNG, but the sticking point is grabbing the Bitmap.) Does Microsoft provide a function somewhere for pulling out an image at this point? The inverse operation, adding a bitmap to the EMF, is abitmap.Draw, what I need is some sort of abitmap.Read that can operate from within the EnumEnhMetaFile data processing.
Is there a function that converts from the data offset fields that EMR_STRETCHDIBITS provides to a Windows Bitmap? Note, I do not want to render the EMF into a bitmap, I want the original bitmap that is stored in the EMF.
Thanks.