NAME

Tk::Thumbnail - Create a Tk::Table of shrunken images.

SYNOPSIS

$thumb = $parent->Thumbnail(-option => value, ... );

DESCRIPTION

Create a Table of thumbnail images, having a default size of 32x32 pixels. Once we have a Photo of an image, shrink it by copying a subsample of the original to a blank Photo.

-images

A list of file names and/or Photo widgets. Thumbnail creates temporarty Photo images from all the files, and destroys them when the Thumbnail is destroyed or when a new list of images is specified in a subsequent configure call. Already existing Photos are left untouched.

-ilabels

A boolean, set to TRUE if you want file names displayed under the thumbnail images.

-font

The default font is fixed.

-iwidth

Pixel width of the thumbnails. Default is 32. The special value -1 means don't shrink images in the X direction.

-iheight

Pixel height of the thumbnails. Default is 32. The special value -1 means don't shrink images in the Y direction.

-command

A callback that's executed on a <Button-1> event over a thumbnail image. It's passed five arguments: the Label widget reference containing the thumbnail Photo image, the file name of the Photo, a boolean indicating whether or not the the Photo is valid, and the Photo's pixel width and height. A default callback is provided that simply displays the original image in a new Toplevel widget. Clicking Button-1 over that Toplevel opens another Toplevel that contains information about the Photo.

METHODS

$thumb->clear;

Destroys all Frames and Labels, and deletes all the temporary Photo images, in preparation for re-populating the Thumbnail with new data.

EXAMPLE

$thumb = $mw->Thumbnail(-images => [<images/*.ppm>], -ilabels => 1);

AUTHOR

Stephen.O.Lidie@Lehigh.EDU

Copyright (C) 2001 - 2004, Steve Lidie. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

KEYWORDS

thumbnail, image