Imager::GIF - a handy module for animated GIF processing
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.
Create a new Imager::GIF object from a sequence of images. One would probably want to use
read method instead.
read(file => $filename)(class method)
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.
Works exactly like
Imager-scale>, but does the right thing for animated gifs.
Implement the rest of the transformations (cropping, rotating etc).
scale(), given some weird combination of
ypixels may produce funny-looking images. Using
scalefactor is usually safer.
Tadeusz SoÅnierz <email@example.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.