Sha256: 403ce48f890e66dacb43c828dc39c4321ecc710febe041b50a13a2cafaaa3972

Contents?: true

Size: 1.48 KB

Versions: 2

Compression:

Stored size: 1.48 KB

Contents

---
title: ThumbnailWriter
inMenu: true
template: /plugin.template
plugin: File/ThumbnailWriter
---
h2(#description). Description


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

The {param: File/ThumbnailWriter: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 {param: File/ThumbnailWriter:resizeMethod} parameter specifies how the image should be resized
for creating the thumbnail. The following pictures illustrate the differences between the settings
for a thumbnail size of 100x100:

<table class="examples">
<tr>
  <td>Original image (320x240)</td><td>@:normal@ (100x75)</td><td>@:cropped@ (100x100)</td>
</tr>
<tr>
  <td style="vertical-align: top"><img src="{relocatable: /images/thumb_example.jpg}" alt="Thumbnail example image" /></td>
  <td style="vertical-align: top"><img src="{relocatable: /images/thumb_example_normal.jpg}" alt="Thumbnail using normal resize method" /></td>
  <td style="vertical-align: top"><img src="{relocatable: /images/thumb_example_cropped.jpg}" alt="Thumbnail using cropped resize method" /></td>
</tr>
</table>


h2(#caveat). Caveat


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

  gem install rmagick

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
webgen-0.4.0 doc/src/documentation/plugins/file/thumbnailwriter.page
webgen-0.4.1 doc/src/documentation/plugins/file/thumbnailwriter.page