I have a jpeg file that's 400k that I used gimp to convert to eps. The eps file is 10.8 MB. I didn't make any modifications other than cropping. Why is it so large and how do I reduce the size.
|
I would suggest using sam2p instead of the GIMP: it will convert the JPEG to EPS (and several other formats, including PDF) in a way that preserves the existing JPEG compression, which will presumably lead to less expansion as well as avoiding image degradation. (It also works on several other input formats, including PNG and GIF Note, however, that if you are going to be converting the result into PDF at some point using Ghostscript, it will stupidly decompress the image and then (by default) recompress it using JPEG-style compression (again, by default). Whether or not Ghostscript recompresses the image, just decompressing it discards information. If you plan to include the figure in a (La)TeX document, you should consider using pdf(La)TeX, which can include JPEG and PNG images directly (though even if it couldn't, you could use sam2p to convert the images to single-page PDF and include that instead). This will prevent any loss of image data and should use about the same size in the PDF as in the JPEG file. |
|||
|
|
|
JPEG is a binary format while EPS is a text format. Since it takes two hexadecimal characters to represent each byte, that alone doubles the size of your file, roughly speaking. Also, JPEG is compressed. I don't know whether the bitmap contained in the EPS file is uncompressed, but it's likely given the great difference in sizes. The difference in size between the JPEG header and the Postscript instructions is a small contributing factor. You may find that running the following command will reduce the file size somewhat:
You will need to have Ghostscript installed in order to have the It's possible that ImageMagick would do a better conversion than Gimp.
|
||||
|
|
You don’t want to use a bitmap editor (including GIMP or ImageMagick) to convert a JPEG to EPS. The image will be decompressed and the file size will increase by an order of magnitude. It may be possible to recompress the image, but you’ll have lost quality. Unfortunately, Inkscape can’t do this either, thanks to limitations in Cairo. This Jpeg2ps tool may be of interest (though I haven’t tried it). Whatever you do, look for |
|||||
|
|
Try shoving it through one of the |
|||
|
|
epsandjpeg?? – SamB Dec 17 '10 at 19:38