GD::Image::Thumbnail

GD::Image::Thumbnail is a Perl extension for creating thumbnailed images with GD.
Download

GD::Image::Thumbnail Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Daniel Muey
  • Publisher web site:
  • http://search.cpan.org/~dmuey/

GD::Image::Thumbnail Tags


GD::Image::Thumbnail Description

GD::Image::Thumbnail is a Perl extension for creating thumbnailed images with GD. GD::Image::Thumbnail is a Perl extension for creating thumbnailed images with GD.SYNOPSIS use GD::Image::Thumbnail; my $img = GD::Image->new(100,20); my $thm = $img->thumbnail; # same as { factor => 0.20 } my $thm = $img->thumbnail($n); # same as { side => $n } my $thm = $img->thumbnail({ factor => 0.25 }); my $thm = $img->thumbnail({ factor => 0.25, small => 1 }); my $thm = $img->thumbnail({ side => $n }); my $thm = $img->thumbnail({ side => $n, small => 1 }); my $thm = $img->thumbnail({ w => $w }); my $thm = $img->thumbnail({ h => $h }); my $thm = $img->thumbnail({ w => $w, h => $h }); my $thm = $img->thumbnail({ w => $w, small => 1 }); my $thm = $img->thumbnail({ h => $h, small => 1 }); my $thm = $img->thumbnail({ w => $w, h => $h, small => 1 });thumb() ^thumb() is shortcut for thumbnail() - useful for people who like to bite their nails :) $img->thumbnail(@thm_args)and $img->thumb(@thm_args);are doing the same thingOPTIONSfactor => $nThis makes a thumbnail $n (0.20 by default) times the size of the original. Only a two decimal place number between 0 and 1 are allowed. If a factor is given side, h, and w are all ignoredside => $nMakes the side that will result in a larger thumbnail $n pixels (or opposite if small => 1). If side is given then h and w are ignored.w => $x and h => $yYou can specify one or both of these. If only one is given it makes that side that dimention. If you specify both, the side that will result in a larger thumbnail (based on the image's orientation and *not* the values of w and h if different), is used (or opposite if small => 1).small => 1If true make the images the smallest possible. This will round down instead of up when rounding is necessary and will help decide which side gets set to the given value. $img->thumbnail(10); # 100 x 25 image becomes 40 x 10 $img->thumbnail({ side => 10, small => 1}); # 100 x 25 image becomes 10 x 2resample => 1If true use copyResampled() instead of copyResized() See GD's documentation about the difference. This can also be turned on by specifying a true value as the second argument: $img->thumbnail($n, 1); $img->thumbnail({ factor => $n }, 1); Requirements: · Perl


GD::Image::Thumbnail Related Software