Catalyst::Plugin::Upload::Image::Magick::Thumbnail::Fixed - Making thumbnail image is kept ratio in fixed size image.
Version 0.03
In your Catalyst project,
use Catalyst qw/Upload::Image::Magick::Thumbnail::Fixed/;
You can execute "thumbnail_fixed" method in Catalyst::Request::Upload object
sub resize_to: Local { my ($self, $c) = @_; my $upload = $c->request->upload('file_field'); my $thumbnail = $upload->thumbnail_fixed({ density => '60x70', format => 'png', quality => 100 }); # $thumbnail is Image::Magick object my ($width, $height) = $thumbnail->Get('width', 'height'); # ... }
Create "fixed" size thumbnail image.
$args is hash reference. Please see below arguments detail.
String formatted width x height. See below example format.
"80x60"
Number format of thumbnail width. Priority of density option is higher than width option. Default value is 60pixel.
Number format of thumbnail height. Priority of density option is higher than height option. Default value is 60pixel.
String of image format. You can choose one of gif, jpg or png.
Image quality option. highest value is 100. minimam value is 0. default 70.
See also Image::Magick::Thumbnail, Image::Magick::Thumbnail::Fixed
Toru Yamaguchi, <zigorou at cpan.org>
<zigorou at cpan.org>
Please report any bugs or feature requests to bug-catalyst-plugin-upload-image-magick-thumbnail-fixed 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.
bug-catalyst-plugin-upload-image-magick-thumbnail-fixed at rt.cpan.org
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
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.
To install Catalyst::Plugin::Upload::Image::Magick, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::Plugin::Upload::Image::Magick
CPAN shell
perl -MCPAN -e shell install Catalyst::Plugin::Upload::Image::Magick
For more information on module installation, please visit the detailed CPAN module installation guide.