-
-
11 Jan 2012 13:06:38 UTC
- Distribution: Image-Magick-Thumbnail
- Module version: 0.06
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (0)
- Testers (0 / 1 / 0)
- Kwalitee
Bus factor: 0- License: unknown
- Activity
24 month- Tools
- Download (63.16KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
++ed by:1 non-PAUSE user- Dependencies
- Image::Magick
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Image::Magick::Thumbnail - Produces thumbnail images with ImageMagick
SYNOPSIS
use Image::Magick::Thumbnail 0.06; # Load the source image my $src = Image::Magick->new; $src->Read('source.jpg'); # Create the thumbnail from it, where the biggest side is 50 px my ($thumb, $x, $y) = Image::Magick::Thumbnail::create($src, 50); # Save your thumbnail $thumb->Write('source_thumb.jpg'); # Create another thumb, that fits into the geometry my ($thumb2, $x2, $y2) = Image::Magick::Thumbnail::create($src, '60x50'); # Create yet another thumb, fitting partial geometry my ($thumb3, $x3, $y3) = Image::Magick::Thumbnail::create($src, 'x50'); __END__
DESCRIPTION
This module uses the ImageMagick library to create a thumbnail image with no side bigger than you specify.
There is no OO API, since that would seem to be over-kill. There's just
create
.SUBROUTINE create
my ($im_obj, $x, $y) = Image::Magick::Thumbnail->create( $src, $maxsize_or_geometry);
It takes two arguments: the first is an ImageMagick image object, the second is either the size in pixels you wish the longest side of the image to be, or an
Image::Magick
-style 'geometry' (eg100x120
) which the thumbnail must fit. Missing part of the geometry is fine.Returns an
Imaeg::Magick
image object (the thumbnail), as well as the number of pixels of the width and height of the image, as integer scalars, and (mainly for testing) the ration used in the scaling.WARNINGS
Will warn on bad or missing arguments if you have
use
dwarnings
.PREREQUISITES
Image::Magick
EXPORTS
None by default.
SEE ALSO
perl, Image::Magick, Image::GD::Thumbnail, and Image::Thumbnail for the same formula for various engines.
AUTHOR
Lee Goddard <LGoddard@CPAN.org>
COPYRIGT
Copyright (C) Lee Godadrd 2001-2008. all rights reserved. Available under the same terms as Perl itself.
Module Install Instructions
To install Image::Magick::Thumbnail, copy and paste the appropriate command in to your terminal.
cpanm Image::Magick::Thumbnail
perl -MCPAN -e shell install Image::Magick::Thumbnail
For more information on module installation, please visit the detailed CPAN module installation guide.