Imager::GIF - a handy module for animated GIF processing
version 0.002
my $sonic = Imager::GIF->new(file => 'sonic.gif'); my $small_sonic = $sonic->scale(scalefactor => 0.5); $small_sonic->write(file => 'small_sonic.gif');
This module will attempt to Do The Right Things regarding transformations on animated gifs.
Imager, as compared to Imagemagick is far less magical; animated gifs aren't treated in any special way, they're just the sequence of ordinary images. In order to perform any transformation on them (scaling etc.) one has to transform all the images separately. Besides, transforming images removes all the metadata from them, which breaks animated gifs even more. This module attempts to fix it and make it easy to transform animated gifs without breaking them.
new(@images)
Create a new Imager::GIF object from a sequence of images. One would probably want to use read method instead.
read
read(file => $filename)
Reads an animated gif from the specified location, returns a newly created Imager::GIF object.
write(file => $filename)
Writes the invocant object to a speficied file.
scale()
Works exactly like Imager-scale>, but does the right thing for animated gifs.
Imager-
Implement the rest of the transformations (cropping, rotating etc).
scale(), given some weird combination of xpixels and/or ypixels may produce funny-looking images. Using scalefactor is usually safer.
xpixels
ypixels
scalefactor
Tadeusz Sośnierz <tsosnierz@opera.com>
This software is copyright (c) 2013 by Opera Software ASA.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'Sośnierz'. Assuming UTF-8
To install Imager::GIF, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Imager::GIF
CPAN shell
perl -MCPAN -e shell install Imager::GIF
For more information on module installation, please visit the detailed CPAN module installation guide.