Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tk::animation(3) [suse man page]

Animation(3)						User Contributed Perl Documentation					      Animation(3)

NAME
Tk::Animation - Display sequence of Tk::Photo images SYNOPSIS
use Tk::Animation my $img = $widget->Animation('-format' => 'gif', -file => 'somefile.gif'); $img->add_frame(@images); $img->start_animation; $img->start_animation( $period ); $img->next_image; $img->prev_image; $img->set_image( 0 .. $#frames ); $img->pause_animation; $img->resume_animation( $period ); $img->fast_forward( $multiplier ); $img->fast_reverse( $multiplier ); $img->stop_animation; $img->set_disposal_method( $boolean ); DESCRIPTION
In the simple case when "Animation" is passed a GIF89 style GIF with multiple 'frames', it will build an internal array of "Photo" images. The "add_frame" method adds images to the sequence. It is provided to allow animations to be constructed from separate images. All images must be "Photo"s and should all be the same size. "start_animation($period)" then initiates a "repeat" with specified $period to sequence through these images. As for raw "repeat" $period is in milliseconds, for a 50Hz monitor it should be at least 20ms. If $period is omitted it is determined from the GIF metadata (see below), or if this is not possible it defaults to 100 milliseconds. "stop_animation" cancels the "repeat" and resets the image to the first image in the sequence. For fine-grained control "next_image" and "prev_image" move one frame forward or backward. "set_image" randomly positions the animation to a particular frame. "pause_animation" pauses the movie and "resume_animation" continues from the pause point. "fast_forward" and "fast_reverse" speed through the movie either forwards or backwards. $multiplier specifies how much faster the animation moves. If Image::Info is installed, then the repeat period time and disposal method of GIF animations are determined from the GIF metadata directly. Otherwise the disposal method must be set manually by using "set_disposal_method" (1 for blanking the previous images, 0 for leaving the previous images as is). The repeat period time may be given in the "start_animation" method. NOTES
"set_disposal_method" was formerly known as "blank" method, but the naming of this method was a mistake. If the disposal method is not set correctly, either by "set_disposal_method" or by determining from the GIF metadata, then the following may happen: By default Animation leaves the previous movie frame in the animation photo. Many times overlaying subsequent frames produces a composite that looks blurred. BUGS
This module should not depend on a module which is not declared as a dependency (Image::Info). The delays between images may vary in a GIF animation. This cannot be handled by this module yet. The handling of the various disposal methods is not correct. perl v5.12.1 2007-11-08 Animation(3)

Check Out this Related Man Page

img-gif(3tk)															      img-gif(3tk)

NAME
img-gif - Img, Graphics Interchange Format (gif) SYNOPSIS
package require Tk package require img::gif ?1.3? image create photo ?name? ?options? DESCRIPTION
The package img::gif is a sub-package of Img. It can be loaded as a part of the complete Img support, via package require Img, or on its own, via package require img::gif. Like all packages of Img it does not provide new commands, but extends the existing Tk command image so that it supports files containing raster images in the Graphics Interchange Format (gif). More specifically img::gif extends Tk's photo image type. The name of the new format handler is gif. This handler provides new additional configuration options. See section GIF OPTIONS for more detailed explanations. All of the above means that in a call like image create photo ?name? ?options? [1] Image data in gif format (options -data and -file) is detected automatically. [2] The format name gif is recognized by the option -format. In addition the value for the option is treated as list and may contain any of the special options listed in section GIF OPTIONS. GIF OPTIONS
The handler provides two options, one for reading from a GIF image, the other influencing the writing of such. -index n This option is for reading from GIF files containing more than one image (animated GIF's, GIF movies. When specified it will read the n'th image in the data. The first image is at index 0 and will be read by default, i.e. when the option is not specified. -interlaced bool If the value of this option is set to true the image will be written using the interlaced sub-format of GIF. The default is to write non-interlaced files. This option is not implemented yet. IMAGE COMPRESSION
Instead of LZW the run-length encoding of Hutchison Avenue Software Corporation is used, also known as miGIF compression. The miGIF com- pression routines do not, strictly speaking, generate files conforming to the GIF spec, since the image data is not LZW-compressed (this is the point: in order to avoid transgression of the Unisys patent on the LZW algorithm.) However, miGIF generates data streams that any rea- sonably sane LZW decompresser will decompress to what we want. TRANSPARENCY
If you want to write images to disk which contain transparency information (e.g. GIF89) you need at least Tk 8.3. SEE ALSO
img-bmp, img-gif, img-ico, img-intro, img-jpeg, img-pcx, img-pixmap, img-png, img-ppm, img-ps, img-sgi, img-sun, img-tga, img-tiff, img- window, img-xbm, img-xpm KEYWORDS
gif, image handling, tk COPYRIGHT
Copyright (c) 1995-2003 Jan Nijtmans <nijtmans@users.sourceforge.com> Img 1.3 img-gif(3tk)
Man Page