RE: [PHP] image code

2001-06-20 Thread Andrew Chase

I wrote thumbnailing script that did exactly what you said below, but to
eliminate the needless regeneration of existing thumbnails I just did a
check to see if the thumbnail already exists:

if(!file_exists(/path/to/thumbnail.jpg)){

//Create the thumbnail here

}

If the thumbnail already exists, the script skips over it, but if it doesn't
it creates it as needed.

-Andy



 -Original Message-
 From: Hugh Bothwell [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, June 19, 2001 1:02 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] image code


 Seems pretty straightforward, actually; I would write a script
 that takes as
 parameters the name and desired size of a graphic, resizes it, and returns
 the thumbnail ( look at ImageJPEG() ).  Then I would write a script that
 iterates through the files in the directory and, for each, gets a
 thumbnail.

 The only problem is that this is a fair bit of work; if it's called at all
 frequently, you might be better to create a static version.  But that of
 course does away with the 'self-updating' bit.

 A possible fix would be to write master page:
 check how long since the page has been updated; if necessary, create and
 save an updated version of the imagelist.  Then forward the user to the
 saved static version.  This would let you have the page update itself on a
 delayed basis, ie hourly.


-- 
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]




Re: [PHP] image code

2001-06-19 Thread Hugh Bothwell

Seems pretty straightforward, actually; I would write a script that takes as
parameters the name and desired size of a graphic, resizes it, and returns
the thumbnail ( look at ImageJPEG() ).  Then I would write a script that
iterates through the files in the directory and, for each, gets a thumbnail.

The only problem is that this is a fair bit of work; if it's called at all
frequently, you might be better to create a static version.  But that of
course does away with the 'self-updating' bit.

A possible fix would be to write master page:
check how long since the page has been updated; if necessary, create and
save an updated version of the imagelist.  Then forward the user to the
saved static version.  This would let you have the page update itself on a
delayed basis, ie hourly.

David L. Walgamotte Jr. [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...

 Can anyone send me sample code or point me in the right direction.  I'm
 looking for a php script that will index and thumbnail a directory of
images.
 So when I drop an image in this directory the web page will update
automaticly.






RE: [PHP] image code

2001-06-19 Thread Sitkei Pl

http://dougiamas.com/photoframe

-Original Message-
From: David L. Walgamotte Jr. [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 18, 2001 9:55 PM
To: [EMAIL PROTECTED]
Subject: [PHP] image code



Can anyone send me sample code or point me in the right direction.  I'm
looking for a php script that will index and thumbnail a directory of
images.
So when I drop an image in this directory the web page will update
automaticly.

--
Thanks,
David