Page 1 of 1

Posted: 2006-08-31T10:51:50-07:00
by Bonzo
This code is originaly from Anthonys's example site:

Code: Select all

exec("/usr/local/bin/convert -size 200x200 $image -thumbnail '100x100>' \
            -gravity center  -crop 120x120+0+0\! \
            -background skyblue  -flatten  pad_view.jpg"); 
Its a while since I did this and can not rember what it all means :oops:

But I would guess:
original image size = -size 200x200
original image name = $image
Create a thumbnail = '100x100>'
Put the image in the center of a 120x120 box = -gravity center -crop 120x120+0+0\!
Box background colour = -background skyblue
-flatten
new image name = pad_view.jpg

The output of the code is at the bottom of this page - http://www.rubblewebs.co.uk/imagemagick/mosaic.php

Posted: 2006-08-31T11:48:29-07:00
by Bonzo
It should work without -size; you can use the getimagesize( ) function and build that into your code.

But just try without -size 200x200 and see what happens.

Thats good; I was trying to post this as you posted your edit !