We're updating the issue view to help you get more done.Learn more

Pebble needs a simple image thumbnail generator

Pebble needs a simple image thumbnail generator to make it easier to integrate pictures into blogs. Attached to this request is a patch for such a thing, which can be seen in action at http://bleaklow.com/2007/06/14/visiting_baby_the_worlds_first_stored_program_computer.html

The ThumbnailDecorator does the following:

1. Matches tags of the form <thumbnail src="..." .../>
2. Checks to see if there is already a cached thumbnail that's newer than the source image
2. If not, creates a thumbnail and caches it in the thumbnails subdirectory of the image's directory
3. Replaces the <thumbnail .../> tag with the HTML necessary to display the thumbnail image with a link to the full-size image that will display in a pop-up window.

This patch doesn't require any additional libraries as it uses standard Java2D functionality to create the thumbnails. As it caches the resulting thumbnails it has a minimal performance impact, once the thumbnails exist it only checks the file dates and produces the HTML to display and link to the images.

The resulting thumbnails can be managed using the standard Pebble image management interface. If manual generation of a particular thumbnail is required, the thumbnail can be generated externally and uploaded to the thumbnails directory and the decorator will use it as-is.





Alan Burlison


Fix versions

Affects versions