Is it possible to crop white margins of .eps file

ImageMagickObject is a Windows COM+ interface to ImageMagick. COM+, Visual Basic, and Delphi users should post to this discussion group.
Post Reply
hadi_safiaghdam
Posts: 3
Joined: 2016-06-08T06:31:00-07:00
Authentication code: 1151

Is it possible to crop white margins of .eps file

Post by hadi_safiaghdam »

hello
I install ImageMagick on windows.
Is it possible to crop (delete) white margins of .eps file with ImageMagick?
very thanks
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Is it possible to crop white margins of .eps file

Post by fmw42 »

Have you tried -trim? See http://www.imagemagick.org/Usage/crop/#trim. But if are expecting to write back to an EPS, then Imagemagick is not the tool for you. It will rasterize the vector data in the EPS and then put an EPS vector shell around the raster data.
See http://www.imagemagick.org/Usage/formats/#vector
hadi_safiaghdam
Posts: 3
Joined: 2016-06-08T06:31:00-07:00
Authentication code: 1151

Re: Is it possible to crop white margins of .eps file

Post by hadi_safiaghdam »

thanks
yes. i used:

Code: Select all

mogrify -trim f.eps
but:
1- 73 KB size file increaseed to 614 KB. My journal do not accept large file size.
2- Quality is reduced.

how to reduse the file size?
how to increase the quality?
what is "rasterize"?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Is it possible to crop white margins of .eps file

Post by fmw42 »

Rasterize is convert the vector data to pixels. You should not be converting an EPS to EPS in Imagemagick. Your results are just what I was suggesting might happen. IM is not the proper tool to convert vector to vector, because it makes the vectors into pixels and increase the file size.
hadi_safiaghdam
Posts: 3
Joined: 2016-06-08T06:31:00-07:00
Authentication code: 1151

Re: Is it possible to crop white margins of .eps file

Post by hadi_safiaghdam »

thanks
can you have other way?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Is it possible to crop white margins of .eps file

Post by fmw42 »

Post Reply