Sha256: 2e7d16f59886f32e4de473ee4ded1d42d044c055858acf6cb68f4d3044eb7290

Contents?: true

Size: 1.57 KB

Versions: 6

Compression:

Stored size: 1.57 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. *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
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

6 entries across 6 versions & 1 rubygems

Version Path
webgen-0.4.2 doc/src/documentation/plugins/file/thumbnailwriter.page
webgen-0.4.4 doc/src/documentation/plugins/file/thumbnailwriter.page
webgen-0.4.3 doc/src/documentation/plugins/file/thumbnailwriter.page
webgen-0.4.5 doc/src/documentation/plugins/file/thumbnailwriter.page
webgen-0.4.7 doc/src/documentation/plugins/file/thumbnailwriter.page
webgen-0.4.6 doc/src/documentation/plugins/file/thumbnailwriter.page