Tobias Kremer > Template-Plugin-Imager-0.01 > Template::Plugin::Imager

Download:
Template-Plugin-Imager-0.01.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.01   Source  

NAME ^

Template::Plugin::Imager - Plugin interface to Imager

SYNOPSIS ^

    [% 
        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();
    -%]

DESCRIPTION ^

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' );

AUTHOR ^

Tobias Kremer, tobias@funkreich.de

SEE ALSO ^

Imager, Template

COPYRIGHT ^

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.

syntax highlighting: