Peter Flanigan > CatalystX-Usul > CatalystX::Usul::Model::Imager

Download:
catalystx-usul/CatalystX-Usul-0.17.1.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  0
View/Report Bugs
Module Version: v0.17.1   Source  

Name ^

CatalystX::Usul::Model::Imager - Manipulate images

Version ^

Describes v0.17.$Rev: 1 $

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 the cache_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 ^

CatalystX::Usul::Model
CatalystX::Usul::Moose
Class::Usul::File
Imager
MIME::Types

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) 2014 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

syntax highlighting: