Large images support - how to stop re-parsing?

Hello all,

I'm trying to get some rather large (in terms of dimensions - i.e. width x height) images into my ZenPhoto gallery - yes, I really do want those large images and yes I know my visitors might be on a 2400 baud modem.. I've already adjusted the theme template to show image dimensions (getFullWidth/getFullHeight) and file size (getImageFootprint parsed through size_readable) as a warning :)

Of course, the server is telling me to take a hike as far as generating thumbnails goes, so I usually just upload a smaller version of the image first, generate thumbnails from those, add tags, etc.

Now here's the problem.. once I upload the full size images again, zenphoto will revert to showing the display and thumbnail images as blank - despite the fact that the cache contains valid resized images (for inline gallery display) as well as thumbnails.

Is there any way to stop things from looking at the full size image as far as any parsing it might be doing goes, and just have it pull the cached images when they're available?

Thanks for any thoughts on this :)

Comments

  • You are running afoul of a desire for Zenphoto not to use expired thumbnails. Zenphoto will compare the timestamps of its thumbnails with the current photo. If the photo is newer a new thumb gets made. There is no way around this short of modifying the code in i.php which makes this check.
  • a-ha!

    Well that gives me a starting point if nothing else in terms of code.

    On the other hand.. I can just 'touch' the thumbnails after I upload the full resolution images and then it works just as well - awesome!

    I'll explore the code route later anyway.. would be a cleaner option.

    I'm unsure where to go from here in terms of ZenPhoto development, though - is this a defect that should be logged, or a wishlist item? i.e. "If a thumbnail is available, but is outdated, but no new thumbnail can be generated, use the old thumbnail anyway"?
    I suppose that gets a slight bit convoluted.

    Either way - thanks Stephen!
  • So long as the cache filemtime is more recent than the images nothing will be regenerated.

    This is not a defect. Normally when you upload a new photo you would really like the thumbnail to be made from it. Otherwise you stand the possibility of getting mismatched thumbnails/images.

    I am not really sure why this is even a problem for you unless your server does not have the memory to process the larger images. Caching a large image can take some processing time, but it happens only once. I would imagin it would take longer to do this "management" of your images than for the proper thumb, etc to be generated.
  • "unless your server does not have the memory to process the larger images"

    Correct. That is to say, it might have the memory but the ISP has limited it to.. not sure what value - I think 64MB - but small enough that a 6468x8624 will not have a thumbnail generated, no matter how long I wait.. and that's on the smaller end of the spectrum.

    I agree that it's not a defect and that the behavior, in general, is proper - although I do still think that maybe there should be an option to use the older thumbnail if a newer one could not be generated; though detecting that might be problematic.

    I'll peek through 'i' at a later time, but 'touching' the thumbnails isn't really a huge issue for now. It's only sporadically that these large images would get added and only by me-myself-and-I.

    Thanks again!
Sign In or Register to comment.