1

I can't read the EMF binary file. When I hex-dump it, I still don't understand it. Is there any software to read GDI commands from an EMF file? Thanks.

skaffman
  • 398,947
  • 96
  • 818
  • 769
emeraldhieu
  • 9,380
  • 19
  • 81
  • 139
  • http://msdn.microsoft.com/en-us/library/cc204166(v=prot.10).aspx – rwong Apr 09 '11 at 07:15
  • EMF, I typed three times above. =.= – emeraldhieu Apr 09 '11 at 07:32
  • @rwong: it doesn't help, it's specification. – emeraldhieu Apr 09 '11 at 07:37
  • Are you looking for a software that can convert it into an image, or do you actually need the GDI commands? The latter goal may be quite difficult. According to Wikipedia, http://en.wikipedia.org/wiki/Batik_(software)) and http://en.wikipedia.org/wiki/FreeHEP are two software that can convert EMF file into vector graphics. – rwong Apr 09 '11 at 07:45
  • 1
    I want to see GDI commands, not graphics because we can open EMF file just with mspaint! Of course we can look into the hex dump file, but it's too difficult to understand. – emeraldhieu Apr 09 '11 at 08:40

3 Answers3

3

Your best bet is the EnumEnhMetaFile() API function.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
  • it's good too but PlayEnhMetaFileRecord doesn't write some records. I'm still working on it. http://stackoverflow.com/questions/5763606/losing-texts-when-enumerating-emf – emeraldhieu May 15 '11 at 04:31
2

http://www.flounder.com/metafileexplorer.htm

I've found the Metafile Explorer utility to be quite useful. Not only can you dump a listing of the individual EMF records in the file, but you can also use this utility as a debugger which allows you to single step thru the EMF records while viewing the EMF output being created at the same time. This is a free utility and is the best I've seen for debugging an EMF file.

Mike
  • 21
  • 1
1

I found this, it's good! It can convert emf to GDI or GDI+ commands.

http://frazmitic.free.fr/emfexplorer/index.htm

emeraldhieu
  • 9,380
  • 19
  • 81
  • 139