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 » 2016-06-08T06:35:34-07:00

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: 22080
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

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

Post by fmw42 » 2016-06-08T09:00:41-07:00

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 » 2016-06-08T10:13:09-07:00

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: 22080
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

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

Post by fmw42 » 2016-06-08T10:19:52-07:00

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 » 2016-06-08T10:39:25-07:00

thanks
can you have other way?

User avatar
fmw42
Posts: 22080
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

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

Post by fmw42 » 2016-06-08T10:44:43-07:00


Post Reply