none
wmf a real file format? RRS feed

  • Question

  • Is wmf file format a real file format? I used a tool (PictureGirdle) to convert a jpg into a wmf type. I realise that the header of this file shows a png header.

    Is wmf something like a file container and not a real file type with its own distinctive headers?
    Monday, January 18, 2010 6:22 AM

Answers

  • Hi lavdev,

    A metafile contains records that describe a sequence of graphics operations “records” that can be recorded (during creation) and played back (displayed).  Therefore, a WMF is more like a script than a vector format.  MS-WMF describes this in Section 1.3 Structure Overview.

    I hope this answers your question.

    Regards,
    Mark Miller
    Escalation Engineer
    US-CSS DSC PROTOCOL TEAM

    • Marked as answer by Chris Mullaney Wednesday, February 10, 2010 10:26 PM
    Friday, January 22, 2010 4:52 PM

All replies

  • Hi Lavdev,

    WMF is an Open Specification file format which is defined in this document, http://msdn.microsoft.com/en-us/library/cc250370(PROT.13).aspx

    I hope this answers your question.

    Regards,
    Mark Miller
    Escalation Engineer

    US-CSS DSC PROTOCOL TEAM

    Monday, January 18, 2010 1:33 PM
  • Hi Mark,

    wmf is an open specification file format. Does that mean that wmf is not actually a real file type (unlike jpg and png)?

    I am confused how the tool converted my jpg image to a wmf and when I opened it in hexedit, it shows a png header.

    So, there is no distinctive wmf header for a wmf file?

    Kindly confirm with me.
    Tuesday, January 19, 2010 1:04 AM
  • Hi lavdev,

    You can not save a raster image as a WMF, or EMF file.  If you try to do this in GDI+ (or System.Drawing) it will automatically save the image as a PNG file instead.

    You will find the details of the WMF header in the document I sent a link to previously, http://msdn.microsoft.com/en-us/library/cc250370(PROT.13).aspx.  Refer to Section 1.3.1 for a description of the Metafile Structure, and Section 2.3.2.2 META_HEADER Record.

    Regards,
    Mark Miller
    Escalation Engineer

    US-CSS DSC PROTOCOL TEAM

    Tuesday, January 19, 2010 1:18 PM
  • Hi lavdev,

    You can not save a raster image as a WMF, or EMF file.  If you try to do this in GDI+ (or System.Drawing) it will automatically save the image as a PNG file instead.

     

    You will find the details of the WMF header in the document I sent a link to previously, http://msdn.microsoft.com/en-us/library/cc250370(PROT.13).aspx .  Refer to Section 1.3.1 for a description of the Metafile Structure, and Section 2.3.2.2 META_HEADER Record.

    Hi Mark,

    I get it now. So it is not possible to convert a jpg image to a wmf? The file extension (after the conversion using the PictureGirdle tool) stated as .wmf and my mac OS could not support it normally. But when I opened in hexedit, it shows a png header. And this happened due to default as you mentioned right?

    I read the document for wmf specifications before. Not quite getting it but I would like to know if I open a .wmf file in hexedit, will I see the header beginning with wmf? I am trying to find a wmf file in the internet but my search has been leading to 0 all along.

    Thanks for clarifying
    Wednesday, January 20, 2010 3:19 AM
  • Hi lavdev,

    So it is not possible to convert a jpg image to a wmf? You would need to code a solution or find a third party application that can convert the image.  I am not aware of one.

    And this happened due to default as you mentioned right?  Yes.

    I read the document for wmf specifications before. Not quite getting it but I would like to know if I open a .wmf file in hexedit, will I see the header beginning with wmf? No.  There is no specific/distinct key identifying a “Non-Placeable” WMF.  With our WMF APIs a parse fail is assumed to be an invalid WMF.  However, a “Placeable WMF” does have a distinct key, which is 0x9AC6CDD7 (this is covered in the specification, Section 2.3.2.3).  So, it is possible you could identify "Placeable" WMFs without parsing but _not_ "Non-Placeable" WMFs.


    I hope this answers your questions.

    Regards,
    Mark Miller
    Escalation Engineer

    US-CSS DSC PROTOCOL TEAM

    Wednesday, January 20, 2010 1:51 PM
  • Hi Mark,

    Is WMF a vector file format or equivalent like .eps?
    Friday, January 22, 2010 7:01 AM
  • Hi lavdev,

    A metafile contains records that describe a sequence of graphics operations “records” that can be recorded (during creation) and played back (displayed).  Therefore, a WMF is more like a script than a vector format.  MS-WMF describes this in Section 1.3 Structure Overview.

    I hope this answers your question.

    Regards,
    Mark Miller
    Escalation Engineer
    US-CSS DSC PROTOCOL TEAM

    • Marked as answer by Chris Mullaney Wednesday, February 10, 2010 10:26 PM
    Friday, January 22, 2010 4:52 PM