Name
CatalystX::Usul::Model::Imager - Manipulate images
Version
0.8.$Revision: 1320 $
Synopsis
package YourApp;
use Catalyst qw(ConfigComponents...);
__PACKAGE__->config(
'Model::Imager' => {
parent_classes => q(CatalystX::Usul::Model::Imager),
scale => { scalefactor => 0.5 } }, );
# For a thumbnail image
# http://localhost:3000/imager/scale/static/images/catalyst_logo.png?scalefactor=0.5
Description
Transform any image under the document root using the Imager module
Configuration and Environment
Defines the following attributes
- cache_depth
-
A positive integer which defaults to
2
. The number of intermediate directory levels beneath thecache_root
- cache_root
-
A required path which points to the root of the image cache
- methods
-
An array ref of non empty simple strings which are the list of methods that can be applied to the image. Defaults to
scale scaleX scaleY crop flip rotate convert map
- root
-
A required directory. The document root for serving static content
- types
-
An instance of MIME::Types
Subroutines/Methods
COMPONENT
Sets attributes for the document root and the cache root
transform
($data, $type, $mtime) = $self->transform( $args, $query );
Creates an Imager object for the supplied path under the document root. Transforms the object using the supplied method and parameters. Returns the rendered image data, the mime type and the modification time of the image file
Diagnostics
None
Dependencies
Incompatibilities
There are no known incompatibilities in this module
Bugs and Limitations
There are no known bugs in this module. Please report problems to the address below. Patches are welcome
Author
Peter Flanigan, <Support at RoxSoft.co.uk>
License and Copyright
Copyright (c) 2013 Peter Flanigan. All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic
This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE