Martin Osieka

'Windows Metafile' FileType Plugin (.EMF, .WMF, .EMZ, .WMZ)

Recommended Posts

 

'Windows Metafile' FileType Plugin (.EMF, .WMF, .EMZ, .WMZ)

Summary

Imports Windows metafiles and renders them to Paint.NET bitmap layers. Supported types are WMF, EMF, EMF+, and the compressed variants WMZ and EMZ. The compressed variants are not documented but MS Word is able to insert them.

There is a very basic implementation of export to EMF. It embeds the bitmap layer of Paint.NET into an EMF. Because it is not possible to generate vectors from the bitmap this feature is of limited use.

Author

Martin Osieka

Download

Find the latest version of the plugin ImEMF,WMF.FileType v1.1 (8.3.2015) >> HERE <<

Installation

Follow the instructions carefully

  • Copy the two files OptionBasedLibrary vX.X.dll/.dlc to the Paint.NET\ folder (NOT to Paint.NET\FileTypes\ !!!)

  • Copy the two files 'ImEMF,WMF.FileType.dll/dlc' to the Paint.NET\FileTypes\ folder

  • Do not remove older versions of the OptionBasedLibrary if they are required from other plugins.

To verify the installation you should restart Paint.NET and check that in the filetype popup in the open file selector dialog are entries starting with EMF and WMF.

Compatibility

Paint.NET 3.5.11 and 4.0.5

Supported languages

The language used in the plugin depends on the language setting of Paint.NET and the support of this language by the plugin. The fallback is the first supported language of the plugin. Languages are defined in the .dlc files. This plugin supports the following languages in the moment:

  • English
  • Deutsch

Dialog options

 

ImEMF,WMF.FileType.Dialog.jpg

 

  • File Infos section

This section just shows settings loaded from the file. Typically the resolution is the physical resolution of the screen attached to the computer where the metafile has been created. The pixel values are somehow virtual because a metafile contains a vector grafic. There are three basic variants of Windows metafiles:

- WMF (Windows Metafile) is the oldest and supports GDI 16bit only.
- EMF (Enhanced Metafile) is the update to GDI 32bit.
- EMF+ (Enhanced Metafile Plus) adds the features of GDI Plus (i.e. anti-aliasing and alpha channel)

  • Render section

The default values of resolution and extent are the values in the File Infos section. By increasing or decreasing the dpi value you are changing the quality of the final image.

The anti-alias option allows you to improve the quality of the old formats WMF and EMF. This is done by translating all commands in the file from GDI to GDI Plus. This feature is off by default because the translation may have unexpected effects in the final image.

The background color defines the filling of the image canvas before the rendering starts. The default color is transparent white.

Known issues

  • Paint.NET does not provide a load dialog template to filetype plugins. So to allow the plugin to show a dialog it delegates its dialog (derived from PdnBaseForm) to the thread of the main window. This works fine but not perfect. I.e there will not be an error beep if you are clicking to the main window while the load dialog is open.
  • If you are canceling the option dialog you will get an unspecified error. But this just means that Paint.NET has no idea about canceling the load operation. PDN4 allows you to check the error details. If it tells "Canceled by user" then no error happened.
  • If you try to 'Save' (not 'Save As') a loaded metafile then Paint.NET will not fallback to 'Save As' automatically. The 'Save' dialog opens and shows an error. This is fixed in Paint.NET 4.0.

Examples

  • Example Bike.wmf is an example metafile found on the web. Load it with the anti-aliasing option switched off and on to see the difference.
  • Example Sheet.emf and Example Sheet.emz contain the same graphic but the compressed variant is just 10% in size.

History

  • 1.1 (8.3.2015)
    - Replaced in 'File Infos' section the dpi values line with a line showing the
      physical size given in the metafile.
    - Use of virtual pixels to describe the device units in the meta file.
  • 1.0 (22.2.2014)
    - First public release
Edited by Ego Eram Reputo
Added link to zipped DLL

Share this post


Link to post
Share on other sites

Getting old, forgot this announcement yesterday.

 

Version update:

  • 1.1 (8.3.2015)
    - Replaced in 'File Infos' section the dpi values line with a line showing the
      physical size given in the metafile.
    - Use of virtual pixels to describe the device units in the meta file.

Share this post


Link to post
Share on other sites

The link isn't working, do you have any other? I usually open my .EMF files like this <snip> but on my other laptop I only have Paint.NET so I need this to work so I can open my files when my PC isn't near me. 

Edited by Ego Eram Reputo
Removed yet another spam link

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now