On 27 Mar,2003 at 13:46 Dave Carrera wrote:

> Hi all
> 

Hi Dave


> I have a database holding file locations of images on my system.
> 
> This works fine and shows them fine on a webpage.
> 
> I was wondering if it is possible to generate and automatic thumbnail
> from the original image (all jpegs) so that I can click the thumbnail to
> see the larger image. I know I can make a small image and a large images
> and store and retrieve those  but I was just wondering if it is possible
> to do auto thumbnails from the array of images.


You could write yourself a little script to generate a thumbnail on the fly ... use an 
img tag like

<img src='thumbnailscript.php?image=thisimage.jpg'>

You could simply cycle through your array and let the thumbnail script create the 
image for you each time.

Have to say, not very efficient ... you'd be far better off either doing an upload 
form that creates your thumbnails at upload or writing a little PHP daemon that sits 
on the server and chucks back the image data when queried...

I would resize on upload...still automatic and only do it once rather than every page 
load...you'll bring your server to its knees if you have a large site with lots of 
hits (or even a small site with lots of hits).

BTW, everyone else, hallo !  Ronan here, I do php / mysql / gd / flash stuff to build 
db driven sites.  Also use templating and OOP with an in house content management 
system to provide generic back end administration sites for our clients.

-- 
Ronan
e: [EMAIL PROTECTED]
t: 01903 739 997
w: www.thelittledot.com

The Little Dot is a partnership of
Ronan Chilvers and Giles Webberley


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to