Search code examples
javaeps

Need to convert EPS files to jpg/png in Java


We have a webapp where people can upload various image file types and on the backend we convert them to a standard type (typically png or jpeg). Right now we are using ImageIO to do this. However the new requirement is to be able to support eps files. I haven't found any libraries that support EPS in ImageIO, or much in the way of support for reading eps files in java.

Any suggestions for reading eps files and converting them?


Solution

  • I'm pretty sure ImageMagick (a C library) can do that (though I believe it requires GhostScript), and there's a JNI wrapper for ImageMagick called JMagick that allows access to ImageMagick from Java. If you can deal with JNI, JMagick might do the trick.