Date: 08/31/01
- Next message: Richard Lynch: "Re: [PHP] The future of PHP"
- Previous message: Adam Plocher: "[PHP] Image manipulation"
- In reply to: Adam Plocher: "[PHP] Image manipulation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Richard Lynch: "Re: [PHP] The future of PHP"
- Previous message: Adam Plocher: "[PHP] Image manipulation"
- In reply to: Adam Plocher: "[PHP] Image manipulation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

