Ticket #142 (new defect)
Bug related to width/height of large thumbnails. Cache is never used if square thumbs option is unchecked!
| Reported by: | admin@… | Owned by: | mike |
|---|---|---|---|
| Priority: | high | Milestone: | 1.1 |
| Component: | General | Version: | |
| Severity: | major | Keywords: | 2nd-opinion |
| Cc: |
Description
Preamble:
I was messing with thumbnail generation to enable Lightbox (as you can see, it works marvelously here: http://zhopik.com/plogger/index.php. Click into any album, then click the little blue icon under any image to see Lightbox work).
So I was using a function generate_thumb(), and as mike described here: http://dev.plogger.org./ticket/119, if in the options Square Thumbs is unchecked, then Plogger uses the value set in Large Thumbnail Width (pixels) option as height instead of width.
Problem:
in file plog-functions.php in function generate_thumb() line 69: ... ($thumb_configfilename_prefix? != && $thumb_configsize? != $width) ...
In case of a large thumb, the prefix will be 'lrg-', so the first part is true. However, thumb_configsize? is never equal to $width because $thumb_configsize? is actually HEIGHT in this case. In my example the image size is 800*600, obviously 600 != 800, and the function always executes the block of code that actually regenerates the thumb (that's the slowest part of this function, especially noticeable with large files).
The fix is to edit a little bit more login related to square thumbs option but a quick hack was just to change $width to $height and it worked for my purposes.
I consider this an important bug, hopefully it wasn't too cryptic.
Rock on!
