Page 1 of 1

a problem with resizing a eps file

Posted: 2017-12-22T20:54:09-07:00
by lowkey
Hello all,
I want to resize a .eps file.

IM Command(Mac High Sierra 10.13.1, ImageMagick 7.0.7-13 Q16):

Code: Select all

convert EPS:test.eps -resize 800x800 test2.eps
I am able to resize the image and generate a .eps file, but it's different from the old one.

My input image:
https://github.com/l-dandelion/images/b ... S/test.eps

Output image after applying the IM command:<br/>
https://github.com/l-dandelion/images/b ... /test2.eps

But when I convert it to a .jpg or .png file, it works.

Code: Select all

convert EPS:test.eps -resize 800x800 test3.jpg

Re: a problem with resizing a eps file

Posted: 2017-12-22T21:48:35-07:00
by fmw42
ImageMagick is a raster processor. So any vector file such as EPS will be rasterized. Imagemagick cannot re-vectorize it. So the raster file is only put into a vector shell. Thus, ImageMagick is probably not the tool you want, if you want to go from vector to vector.

See http://www.imagemagick.org/Usage/formats/#vector

The color reversal is likely due to test.eps being CMYK. So try

Code: Select all

convert -colorspace sRGB EPS:test.eps -resize 800x800 test2.eps
Red coloration differences are probably because your original contains spot colors and ImageMagick cannot handle them.

Note that pure vector images have no size. They are controlled by density when printing. What you are doing is converting the vector image into a raster image at its default density, resizing it and putting it back into a vector shell. I do not see the point of doing that with ImageMagick. You might as well just convert to JPG or GIF.