Web Hosting Talk







View Full Version : ImageMagick thumbnailing / with aspect ratio?


acctman
08-24-2008, 02:18 PM
Hi do anyone have any spam coding on how to thumbnail an image using PHP and ImageMagick?

I want to thumbnail an image with the height of 120px and a max width of 190px

here is the command line I put together from reading the examples on the imagemagick site

convert large.jpg -auto-orient -strip -thumbnail 190x125 tn_small.jpg

i'm not sure if that will keep it with an aspect ratio with the Height being 120px and Width being up to 190px

awatson
08-25-2008, 02:17 PM
See if this page helps:
http://www.imagemagick.org/Usage/thumbnails/#pad

andren
08-29-2008, 02:28 PM
Hi do anyone have any spam coding on how to thumbnail an image using PHP and ImageMagick?

I want to thumbnail an image with the height of 120px and a max width of 190px

here is the command line I put together from reading the examples on the imagemagick site

convert large.jpg -auto-orient -strip -thumbnail 190x125 tn_small.jpg

i'm not sure if that will keep it with an aspect ratio with the Height being 120px and Width being up to 190px
It will keep the aspect ratio. 190 & 125 are the max sizes in either case.