Page 1 of 1

Sizing and other issues between versions - UPDATED

Posted: 2012-07-10T02:59:30-07:00
by martinm
UPDATED - I'm a muppet - not all of the charts are produced usign IM.... :lol:

Hi all, I'm upgrading Debian Etch to Debian Squeeze

Etch Version: ImageMagick 6.2.4 07/28/09 Q16
Squeeze Version: ImageMagick 6.6.0-4 2012-05-03 Q16

The real conversions are done using Perl, but using the cmd line gives the same problems and is easier to debug!
Conversions are gif to pdf

The problem is that some (not all!) converted images fill only the bottom left quarter of the image. I just need to be able to resize larger and crop the other 3/4 of the image but can't get crop to work in this way. It's possible that the source image is only 1/4 of a page in size.


Thanks,

Martin

Re: Sizing and other issues between versions - UPDATED

Posted: 2012-07-10T10:18:18-07:00
by fmw42
You gif files likely have virtual canvas associated with them. You need to remove that. try

convert image.gif +repage image.pdf

see
http://www.imagemagick.org/Usage/crop/#crop_repage

Re: Sizing and other issues between versions - UPDATED

Posted: 2012-07-11T08:36:42-07:00
by martinm
Perfect, works a treat thanks.

Now I need to get that into the Perl script.

A google shows that theres is no +page available to Perl, and 'Your Crop needs the equivalent of +repage in order to shrink the canvas. I think your Set should be $background->Set( page=>'0x0+0+0' ); '

Does this look correct?

Cheers.