webgen logo

webgen / static website generator

static website generation made easy!

Latest news

2007-12-31: Minor release with feature enhancements. More...

2007-09-08: Small bug fix release. More...

2007-06-29: Some bug fixes and one small feature enhancement. More...

Links

Generated by webgen

General Information

Plugin name:File/ThumbnailWriter (File/DefaultHandler)
Author:Thomas Leitner <t_leitner@gmx.at>
Summary:Writes out thumbnails with RMagick
Parameters:

resizeMethod:normal
Specifies the algorithm which should be used for generating the thumbnail: :normal (thumbnail fits exactly into given thumbnail size), :cropped (resized to exact thumbnail size, image parts maybe cropped)

thumbnailSize"100x100"
The size of the thumbnails

Description

This plugin is used by other plugins to create thumbnails for images. For example, the File/GalleryHandler uses it to automatically create thumbnails for all images in an image gallery.

The thumbnailSize parameter has to be in the format “WIDTHxHEIGHT” where WIDTH and HEIGHT are numeric values specifying the width and the height for the thumbnail.

The resizeMethod parameter specifies how the image should be resized for creating the thumbnail. Be aware that the value has to be a symbol, not a string (:normal instead of normal)!

The following pictures illustrate the differences between the settings for a thumbnail size of 100×100:

Original image (320×240):normal (100×75):cropped (100×100)
Thumbnail example image Thumbnail using normal resize method Thumbnail using cropped resize method

Caveat

This plugin is only available if you have installed the rmagick library. The preferred way to do this is via Rubygems:

gem install rmagick