Forum Moderators: phranque
1. Resize a jpg/gif image of random dimensions to fit a space of 80x60 while keeping it's aspect ratio (no stretching or cropping)
2. Fill any empty space with white to maintain the 80x60 size
So, if I feed the program a 100x100 image file, I want to get the image resized to 60x60 inside a white 80x60 box. Sort of like the thumbnails you see on ebay. The extra space is filled with white.
I was using this 2 lines of code to acomplish this, and it worked, but for some reason it doesn't work on the server I'm using now:
convert -verbose -size 80x60 -resize 80x60 -density 72x72 -dither -flatten +profile "*" old.jpg new.jpg
composite -verbose -geometry 80x60 -gravity center new.jpg -size 80x60 -resize 80x60 xc: white new.jpg
Any ideas on how do I accomplish this?
Thanks for any help in advance!
Have you compared the version of ImageMagick you were using on the old server with the version on the new server?
If the new server has an older version, the solution would be to simply upgrade ImageMagick. If it has a newer version, you might want to consider downgrading or looking at the docs of the newer version to see if the functions you're using have changed their syntax.
Cheers,
Greg