Amy Pearson Amy is a Java developer, member of the support team and product manager for JDeli. Out of hours she enjoys gaming and Virtual reality.

How to read EMF files in Java (Tutorial)

1 min read

EMF icon

What is EMF file format?

EMF iconEMF (Enhanced Meta file) is a public vector image format invented by Microsoft and very popular on the Windows platform. You can learn more about them in our post “What are the WMF and EMF image file formats?”.

The filename extension for EMF files is: .emf

Why do EMF Images cause problems for Java Developers?

ImageIO does not support EMF files by default so existing Java Applications will not work with them. This is a problem because EMF is a common image format for Windows and used for a lot of clip art.

In this post, I will cover how to use JDeli to add EMF support to existing Java Applications which use ImageIO (without having to make any code changes) and how to read EMF images in JDeli directly.

What options are there for reading EMF files in Java?

Java does not read EMF images by default so you will need to use an external library or plugin for ImageIO. JDeli offers pure Java support for EMF images and can also be used as a plugin for ImageIO.

In this article we will be using our JDeli pure Java library to read EMF files.

How to upgrade ImageIO to read EMF files

It’s actually very simple and can be done without rewriting your existing code!

For example, the code below does not work with ImageIO for EMF images


Steps to fix with JDeli:

How to read an EMF image in Java directly with JDeli

  1. Add JDeli to your class or module path. (download the trial jar).
  2. Read the EMF image into a BufferedImage

and the Java code to read EMF files in JDeli…

Other useful EMF links



Are you a Java Developer working with Image files?

Amy Pearson Amy is a Java developer, member of the support team and product manager for JDeli. Out of hours she enjoys gaming and Virtual reality.