> Basically what i am trying to do is create a photo gallery on a jsp
> page i have the following code (though very ugly). Right now the image
> is being downloaded in full by the user and just being resized to fit
> the defined dimensions. What i would like to do is have the page
> create thumbnails as it finds each file and then display those (for
> faster downloading)
Good thing you clarified your message, I thought you were talking about
a local J2SE application!
<pseudoCode>
URL getThumbnailFor(URL originalSizeImage) {
check thumbnail cache to see if we've already made a thumbnail of this
image;
if (already have thumbnail) {
return URL to already made thumbnail.
}
load originalSizeImage;
resize the image to thumbnail size;
add thumbnail to cache;
return URL to already made thumbnail.
}
</pseudoCode>
- Oliver