NAME
Catalyst::Plugin::Upload::Image::Magick::Thumbnail::Fixed - Making thumbnail image is kept ratio in fixed size image.
VERSION
Version 0.04
SYNOPSIS
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');
# ...
}
METHODS
thumbnail_fixed($args)
Create "fixed" size thumbnail image.
- $args
-
$args is hash reference. Please see below arguments detail.
- density
-
String formatted width x height. See below example format.
"80x60"
- width
-
Number format of thumbnail width. Priority of density option is higher than width option. Default value is 60pixel.
- height
-
Number format of thumbnail height. Priority of density option is higher than height option. Default value is 60pixel.
- format
-
String of image format. You can choose one of gif, jpg or png.
- quality
-
Image quality option. highest value is 100. minimam value is 0. default 70.
See also Image::Magick::Thumbnail, Image::Magick::Thumbnail::Fixed
AUTHOR
Toru Yamaguchi, <zigorou at cpan.org>
SEE ALSO
BUGS
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.
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:
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
Current Maintainer
The current maintainer of this module is Adam Hopkins. Any questions or comments should be sent to him at srchulo@cpan.org
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.