CROP option changed?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
kadkam
Posts: 9
Joined: 2008-01-09T08:20:23-07:00

CROP option changed?

Post by kadkam »

on version 6.3
I using this command line:
convert "test1.png" -crop 3307X4677+0+0 "result.pdf"

I have updated to 6.5
and now the Crop command not function with pdf destinations

why?
Last edited by kadkam on 2009-05-11T08:46:28-07:00, edited 1 time in total.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: CROP option changed?

Post by magick »

Add +repage just before result.pdf. Does that give you the expected results?
kadkam
Posts: 9
Joined: 2008-01-09T08:20:23-07:00

Re: CROP option changed?

Post by kadkam »

ok now.

thanks!

only for understand, why +repage need on pdf and not for png result?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: CROP option changed?

Post by fmw42 »

It is needed for all formats to reset the virtual canvas from the original image size to the new size

see
http://www.imagemagick.org/script/comma ... php#repage
http://www.imagemagick.org/script/comma ... s.php#crop
http://www.imagemagick.org/Usage/crop/#crop_repage
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: CROP option changed?

Post by anthony »

Though many formats ignore or don't use a image 'offset' or canvas normally.

JPEG does not save it
PNG only saves offsets but few programs use the offset

and so on.

Obviously the PDF coder does use it. Probably for positioning images on a page.

In any case +repage resets the offset and sets the page size to the same size as the image itself.


Does anyone have any other information on how PDF images use the pafge/canvas infomation?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply