Toru Yamaguchi > Catalyst-Plugin-Upload-Image-Magick-0.03 > Catalyst::Plugin::Upload::Image::Magick

Download:
Catalyst-Plugin-Upload-Image-Magick-0.03.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  2
Open  0
View/Report Bugs
Module Version: 0.02   Source   Latest Release: Catalyst-Plugin-Upload-Image-Magick-0.04

NAME ^

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

VERSION ^

Version 0.02

SYNOPSIS ^

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 ^

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 ^

Toru Yamaguchi, <zigorou at cpan.org>

SEE ALSO ^

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

BUGS ^

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 ^

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

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

You can also look for information at:

ACKNOWLEDGEMENTS ^

COPYRIGHT & LICENSE ^

Copyright 2006 Toru Yamaguchi, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: