Re: Image manipulation

From: Date: Sat, 01 Sep 2001 00:47:09 +0000
Subject: Re: Image manipulation
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-65566@lists.php.net to get a copy of this message
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 >

« previous php.general (#65566) next »