Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    GD::Image::Thumbnail 0.02

    Download button

    No screenshots available
    Downloads: 356  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Daniel Muey | More programs
    Perl Artistic License / FREE
    April 25th, 2007, 00:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    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 thing

    OPTIONS

    factor => $n

    This 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 ignored

    side => $n

    Makes 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 => $y

    You 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 => 1

    If 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 2
    resample => 1

    If 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);

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    generate thumbnail | image thumbnails | Perl module | GD::Image::Thumbnail | thumbnail | images

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM