Question

Do EMF files have a DPI that can be set? I have an application that allows saving an image in multiple formats (including EMF). I allow the user to specify the resolution/DPI for the image(s). However, I cannot find a way to do this for a MetaFile in C#. Is this possible or does EMF not have a DPI since it is a vector graphics format?

Was it helpful?

Solution

According to the MS-EMF spec, no. But ‘EMF plus’ extensions (MS-EMFPLUS) have a header with LogicalDpiX and LogicalDpiY. This format is analogous to GDI+. I don't know what software supports it for import/export though.

OTHER TIPS

Metafiles do not have a DPI because they do not have dots - it is a vector graphics format. Metafiles do have size, which is presumably what you want. You can set the size of a metafile (in HIMETRIC) when you call the Metafile constructor.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top