Page 1 of 1

Trim and resize PSD, convert to GIF - does not work

Posted: 2012-01-07T04:49:45-07:00
by smantscheff
I'm trying to convert a bunch of PSD files by trimming the transparent space, resizing and converting to GIF.
Find a sample at http://www.ovula.de/images/ovula-caweli ... narzt1.psd

First try:

Code: Select all

convert zahnarzt1.psd -trim -resize 500x500 zahnarzt1.gif

Result: http://www.ovula.de/images/ovula-caweli ... narzt1.gif
The result is resized, but the transparent space not cropped.

Second try:

Code: Select all

convert zahnarzt1.psd -trim zahnarzt1.trimmed.psd
convert zahnarzt1.trimmed.psd  -resize 500x500 zahnarzt1.trimmed.gif
Result: http://www.ovula.de/images/ovula-caweli ... rimmed.gif
The result is trimmed o.k, but somehow some blue border at the top and a GIF animation sneaked into the result.

I have similar issues with about 25 of 50 images. The others convert fine.
How can I resolve this problem?

Re: Trim and resize PSD, convert to GIF - does not work

Posted: 2012-01-07T15:53:14-07:00
by fmw42
add +repage after your -trim

convert zahnarzt1.psd[0] -trim +repage zahnarzt1.gif


That seems to work for me with IM 6.7.4.4 Q16 Mac OSX Tiger.

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

Re: Trim and resize PSD, convert to GIF - does not work

Posted: 2012-01-07T16:38:25-07:00
by smantscheff
Thanks a lot. This seems to have done the trick.