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
t_my_face.jpg.gif
in /usr/local/www/htdocs/images

ImageMagick can be found at http://www.imagemagick.org/

Have fun!
-bob

--
Bob Scott                           Web / DB Developer
http://www.covalent.net    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 (http://www.php.net/)
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