3

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?

harmanjd
  • 1,874
  • 19
  • 21
  • jibble - http://www.jibble.org/epsgraphics/ - looks like it might do what I need. Anybody have experience using it? – harmanjd Jan 13 '09 at 19:03
  • 1
    http://jibble.org/epsgraphics is for EPS output, like so many other packages. – clacke Aug 02 '10 at 14:26

4 Answers4

3

Freehep has a Java PostScript Viewer that you might be able to rework into a PS converter.

Rich Apodaca
  • 28,316
  • 16
  • 103
  • 129
2

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.

Brian Clapper
  • 25,705
  • 7
  • 65
  • 65
  • What we ended up doing was calling the imagemagick command line tools directly instead of through JMagick. This appeared to be the easiest solution. – harmanjd May 01 '09 at 13:47
2

Couple of weeks ago I've developped an EPS ImageIO plugin that could interest you :

http://www.spectotechnologies.com/en/open-projects/imageio-eps-plugin

Hope this could help!

Alexandre Lavoie
  • 8,711
  • 3
  • 31
  • 72
1

EPS is PostScript files with preview, IIRC. So basically you need a PostScript interpreter in Java. I doubt you will find many...

Perhaps a better approach is to call GhostScript from Java. It is probably the best free/open source PostScript interpreter/renderer around, it would be hard to beat it.

PhiLho
  • 40,535
  • 6
  • 96
  • 134