Re: PHP image browser

From: Date: Thu, 01 Mar 2001 20:07:06 +0000
Subject: Re: PHP image browser
Groups: php.general 
Request: Send a blank email to php-general+get-42212@lists.php.net to get a copy of this message
Addressed to: "Timothy Wright" <tim.wright@01network.com> php-general@lists.php.net ** Reply to note from "Timothy Wright" <tim.wright@01network.com> Thu, 1 Mar 2001 14:40:16 -0500 > > Can PHP & GD-lib create an index with thumbnail images of all graphics in a > directory? Has anyone done this? Specifically, I would like to create > small (maybe 1/8 or 1/16 size) thumbnails on-the-fly and place them in an > index.php page with links to the larger images. It can be done, but it is not fast enough to do in real time. The way I create thumbnails is ImageMagick. I keep my thumbnails in a hidden directory (.s) and create them like this: mkdir( "imagedir/.s" 0700 ); system( 'cp imagedir/*.jpg imagedir/.s' ); system( '/usr/local/bin/mogrify -geometry 150X150 imagedir/.s/*' ); The last command will take an image of any size and aspect ratio, maintain the aspect ratio and resize it so the largest dimension is 150 pixels. There are MANY other commands available. Your thunbmails have the same names as the full size files, but are stored in imagedir/.s/. Image Magick: http://www.imagemagick.org/ Rick Widmer Internet Marketing Specialists http://www.developersdesk.com

« previous php.general (#42212) next »