Re: Dynamic images
From: FLEB (soon.the.sp_at_mmers.and.evil.ones.will.bow-down-to.us)
Date: 01/24/04
- Next message: FLEB: "Re: use a local php script to execute a remote php script and return results?"
- Previous message: Bilal: "Problem with validation of a field"
- In reply to: CountScubula: "Re: Dynamic images"
- Next in thread: CountScubula: "Re: Dynamic images"
- Reply: CountScubula: "Re: Dynamic images"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 24 Jan 2004 00:42:59 -0500
Regarding this well-known quote, often attributed to CountScubula's famous
"Sat, 24 Jan 2004 01:48:37 GMT" speech:
> "Chung Leong" <chernyshevsky@hotmail.com> wrote in message
> news:iIydnbKaXIqAXIzd4p2dnA@comcast.com...
>> Nice. I think we make better use of the client cache though, by
> redirecting
>> to the generated image. As it is, the browser has to refetch the image
>> everytime.
>
> Thank you,
>
> Hmm, sounds interesting, you mean have a cache dir that is in the web server
> view, and do a Location: bla.... to point to the image?
>
> Hmm I will have to play and see, becouse as it is, if there is any change
> int he source image, there is a new image generated.
>
> also, I just added a few more functions:
>
> title - add a caption
> pan - show part of image
> zoom - show a zoomed from middle portion
> tile - tile the image
Just title the cached image uniquely --
something like:
[PATH-HASH]_[MOD-DATE].ext
where [PATH-HASH] is the full original path, run through something (md5 or
a search-replace) to purge evil chars, and [MOD-DATE] is the file's
last-modified date. When the code is run, do something like:
1.) Get all filenames containing [PATH-HASH] in the cache directory
2.) Is the latest [MOD-DATE] the same as the real file's modified-stamp?
3. Yes) Do not recreate the thumbnail. Redirect to the cached version.
3. No) Delete (unlink) all files with [PATH-HASH]_*
4. No) Create a new thumbnail, and redirect to it.
-- -- Rudy Fleminger -- sp@mmers.and.evil.ones.will.bow-down-to.us (put "Hey!" in the Subject line for priority processing!) -- http://www.pixelsaredead.com
- Next message: FLEB: "Re: use a local php script to execute a remote php script and return results?"
- Previous message: Bilal: "Problem with validation of a field"
- In reply to: CountScubula: "Re: Dynamic images"
- Next in thread: CountScubula: "Re: Dynamic images"
- Reply: CountScubula: "Re: Dynamic images"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|