Adam -

If you're on a machine that has ImageMagick installed on it
(most Linux boxes I've been on have it installed already)
you can do something like this in PHP:

$origfile = "/home/bob/my_face.jpg";

$img_dir = "/usr/local/www/htdocs/images";

$dest_file = $img_dir . "/t_" . basename($userfile) . ".gif";

$s = system ("/usr/X11R6/bin/convert -geometry 100x100 $userfile $dest_file");

will create a 100x100 pixel thumbnail image called
in /usr/local/www/htdocs/images

ImageMagick can be found at

Have fun!

Bob Scott                           Web / DB Developer    Covalent Technologies, Inc.

On Fri, 31 Aug 2001, Adam Plocher wrote:

> Hey I got a few questions about image manipulation.
> First of all, is there anyway I could have my script take a full size image
> and crop out a chunk of it to be used as a thumbnail - or just simply shrink
> the image down to be used as a thumbnail?
> Also, is there anyway to convert misc image types (gif, bmp, png, etc) into
> a jpeg?
> Any help will be very appreciated, thanks.
> -Adam Plocher

PHP General Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to