The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

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. Already existing Photos are left untouched.

-labels

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

-font

The default font is fixed.

-width

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

-height

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 two arguments, the Label widget reference containing the thumbnail Photo image, and the file name of the Photo.

METHODS

$thumb->free_photos;

Deletes all the temporary Photo images.

EXAMPLE

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

AUTHOR

Stephen.O.Lidie@Lehigh.EDU

Copyright (C) 2001 - 2002, 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