Template::Plugin::Imager - Plugin interface to Imager
[% FILTER null; USE im = Imager(); im.read( 'file', 't/testimage.jpg' ); im.convert( 'preset', 'noalpha' ); thumb_im = im.scale( 'xpixels', 32 ); thumb_im.write( 'file', 't/scaledimage.jpg' ); im.read( 'file', 't/scaledimage.jpg' ); END; im.getwidth(); -%]
This module provides an interface to the Imager library. See Imager for a complete description of the Imager library.
Be aware that due to Template::Toolkit merging named parameters into hashrefs while Imager's methods expect hash parameters you have to pass parameters in list form! So when you'd normally do this:
$im->read( file => 'imager.jpg' );
you'll have to call read() like this in your templates:
imager.read( 'file', 'imager.jpg' );
Tobias Kremer, tobias@funkreich.de
Imager, Template
Copyright (C) 2009 Tobias Kremer.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Template::Plugin::Imager, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Template::Plugin::Imager
CPAN shell
perl -MCPAN -e shell install Template::Plugin::Imager
For more information on module installation, please visit the detailed CPAN module installation guide.