Another simple newbie question-

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Post 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
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Post 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 !
Post Reply