Mail Index


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ApacheGallery] Patch to replace inline C code with native Perl



On Wed, Mar 12, 2003 at 06:49:33PM +0100, Thomas Kj?r wrote:
> On Wed, Mar 12, 2003 at 09:44:03AM -0800, Jon McClintock wrote:
> > > Yes, the reason why we initially put it in the index page was that it
> > > only has to be done once. What you really are requesting from the
> > > page is the already scaled image and not something that gets scaled on
> > > the fly. And because of the way we use templates it's not really 
> > > possible to spit out the HTML as soon as the image is generated.
> > 
> > This doesn't make sense. The browser client makes seperate requests for
> > the HTML and the images. You can generate the HTML without having
> > generated all of the images. Why not save the image resize step until
> > the client requests the image?
> 
> One reason could be that the script still would have to access all
> images to get the height/width parameters into the html.

Not really. All of the image/thumbnail sizes are calculated from the size 
of the original image, which is obtained using Image::Size. After all,
it has to know the size of the resized image to be able to call the
resizeimage() routine.

-Jon