Img2eps Project Page
Overview | Supported input files | Generated output | Examples and comparisons | Usage | Download
Img2eps converter is Java application (Java 1.4.0 or better is required) which converts raster images into Encapsulated PostScript (EPS). EPS files can be included into documents (e.g. in TeX) or directly into PostScript. Img2eps uses simple lossless compression, so the generated EPS files are quite small. Img2eps is console based application and has no graphical user interface. Generated EPS is Language Level 2.
It depends on your Java installation which input files are supported. For example, javax.imageio package in Java 1.4.2 reads the following image files: *.jpg (or *.jpeg), *.gif, and *.png. If your input file format is not supported, img2eps will report it and will list all supported formats for you.
Generated EPS file contains the compressed raster image. If number of unique colors inside the picture is less than 256 then palette is generated and each pixel is encoded as one byte (as a reference to the palette). Otherwise palette is not generated and each pixel consists of three bytes (red, green, and blue potion).
Sequence of the same pixels in one line of the image is compressed. This helps mainly if you convert screen snapshots where a lot of such sequences can be found. If you convert picture from digital camera, this feature won't help you.
It is good idea to remove color transitions from windows titles. You may replace the transition by one color -- then will reduce rapidly the number of unique colors inside the image. In such case, img2eps will generate EPS file with palette for you and the image will be pretty small.
The original image (screen snapshot, 449 x 312 pixels, 24 bits/pixel):
|Format||Size [B]||Size [%]|
|EPS generated by ImageMagick||857960||100.0|
|EPS generated by Img2eps (ver. 0.2)||135021||15.7|
|EPS generated by Img2eps (ver. 1.0)||104319||12.2|
In this case, the size of the file generated by Img2eps 1.0 is 12.2% of the file size generated by ImageMagick.
The original image (screen snapshot with removed color transition in window caption, 449 x 312 pixels, 24 bits/pixel):
|Format||Size [B]||Size [%]|
|EPS generated by ImageMagick||857961||100.0|
|EPS generated by Img2eps (ver. 0.2)||32927||3.8|
|EPS generated by Img2eps (ver. 1.0)||24835||2.9|
In this case, the size of the file generated by Img2eps 1.0 is 2.9% of the file size generated by ImageMagick.
Use img2eps.bat on Windows (or img2eps.sh on Linux) to run the Img2eps. Or run the Img2eps directly from command line:
java -jar img2eps.jar [-rRRR] inputFile outputFile
Option -r can be used to specify resolution of the output in pixels/inch. Default value for resolution is 90 pixels/inch. No spaces between -r and the number are allowed!
java -jar img2eps.jar -r144 image.png image.eps
Converts image.png image into image.eps with resolution 144 pixels/inch.
java -jar img2eps.jar picture.jpg pic11.eps
Converts picture.jpg image into pic11.eps with default resolution 90 pixels/inch.
This software is distributed under GNU General Public License (GPL) and WITHOUT ANY WARRANTY!
See Img2eps project page for more details or download Img2eps directly.
Written by Voltik, 2004-11-15