RESIZE

This tutorial covers resizing using PHP with Image Magick from the command line. For more information on PHP variables see Lesson I on making backgrounds.
IM COMMANDFUNCTION
-resize 50%Resize by percent to half size
-resize 100Resize by width will automatically adjust height to fit
-resize 100x100!Resize to skewed size with an exclamation point
-resize 200%Resize to double size
ORIGINAL IMAGE
<?
$IN="button.gif";
$OUT="button2.gif";
$SIZE="-resize 50%";
exec ("/usr/bin/convert $IN $SIZE $OUT");
?>
<?
$IN="button.gif";
$OUT="button2.gif";
$SIZE="-resize 100";
exec ("/usr/bin/convert $IN $SIZE $OUT");
?>
<?
$IN="button.gif";
$OUT="button2.gif";
$SIZE="-resize 100x100!";
exec ("/usr/bin/convert $IN $SIZE $OUT");
?>


Below are a zip of a sample resize script plus a resize form. There is also a text version if you prefer that to the zip.

RESIZE ZIP

RESIZE TEXT