Catalyst::Plugin::Upload::Image::Magick - Image information plugin for Catalyst::Request::Upload


Catalyst-Plugin-Upload-Image-Magick documentation  | view source Contained in the Catalyst-Plugin-Upload-Image-Magick distribution.

Index


NAME

Top

Catalyst::Plugin::Upload::Image::Magick - Image information plugin for Catalyst::Request::Upload

VERSION

Top

Version 0.02

SYNOPSIS

Top

In your Catalyst project,

  use Catalyst qw/Upload::Image::Magick/;

And you can execute method around image information in Catalyst::Request::Image object;

  sub uploaded_action: Local {
    my ($self, $c) = shift;

    $upload = $c->request->upload('file_field');

    if ($upload->is_image) {
      $c->log->debug("width : " . $upload->width);
      $c->log->debug("height : " . $upload->height);
    }

    # ...
  }

METHODS

Top

image()

If uploaded file is image, then return Image::Magick object, is't image then throw Catalyst::Exception.

is_image()

If uploaded file is image, then return 1, else 0.

width()

If uploaded file is image, then return image width, else undef.

height()

If uploaded file is image, then return image height, else undef.

AUTHOR

Top

Toru Yamaguchi, <zigorou at cpan.org>

SEE ALSO

Top

Catalyst
Catalyst::Request::Upload
Image::Magick

BUGS

Top

Please report any bugs or feature requests to bug-catalyst-plugin-upload-image-magick at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Catalyst-Plugin-Upload-Image-Magick. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

Top

You can find documentation for this module with the perldoc command.

    perldoc Catalyst::Plugin::Upload::Image::Magick

You can also look for information at:

* AnnoCPAN: Annotated CPAN documentation

http://annocpan.org/dist/Catalyst-Plugin-Upload-Image-Magick

* CPAN Ratings

http://cpanratings.perl.org/d/Catalyst-Plugin-Upload-Image-Magick

* RT: CPAN's request tracker

http://rt.cpan.org/NoAuth/Bugs.html?Dist=Catalyst-Plugin-Upload-Image-Magick

* Search CPAN

http://search.cpan.org/dist/Catalyst-Plugin-Upload-Image-Magick

ACKNOWLEDGEMENTS

Top

COPYRIGHT & LICENSE

Top


Catalyst-Plugin-Upload-Image-Magick documentation  | view source Contained in the Catalyst-Plugin-Upload-Image-Magick distribution.