any easy library to create a thumbnail

Ask a Question related to PERL Beginners, Design and Development.

  1. #1

    Default any easy library to create a thumbnail

    Hi all,
    I am trying to convert my gifs and png to thumbnails

    Does anyone know a library that can help me

    Thanks
    Ram

    Ramprasad A Padmanabhan Guest

  2. Similar Questions and Discussions

    1. Create new Flex Library
      Hello, I am new in Flex and I want to build a new Flex to library to use it for my application. Anny suggestions? Thanks in advance Erjona
    2. Is there a easy way to create PDF file using VS2005(ASP.NET 2.0)?
      Hi All, I try to export my gridview result plus log image .etc layout to a PDF file from .ASPX page. It there some new feature in VS2003...
    3. for to create thumbnail by imagemagick gd netpbm ?
      for to resize and copy original photos into a new directory and to use for a thumbnail gallery on the web; who is better GD, Netpbm or...
    4. Image::Magick::Thumbnail::create problem
      I am using a script based on the example from www.cpan.org for Image::Magick::Thumbnail:- #!/usr/bin/perl -w use CGI qw(:all); print header;...
    5. Create Thumbnail
      If you can use GD2 library use this function function create_resampled_image($max_height, $max_width, $image_quality, $image, $newimage){...
  3. #2

    Default Re: any easy library to create a thumbnail

    On Fri, 2003-09-12 at 10:57, Ramprasad A Padmanabhan wrote:
    > Hi all,
    > I am trying to convert my gifs and png to thumbnails
    >
    > Does anyone know a library that can help me

    Ram,

    I use Image::Thumbnail (available on CPAN) to convert jpegs, but I'm
    sure there's a way to get gifs working. This module sits on top of GD
    which can be trouble to setup.

    Anyway, here's a script I use to convert images to thumbnails:
    #!/usr/bin/perl -w
    use Image::Thumbnail;

    $src_dir = "/home/ic/catalogs/em/images/items";
    $dest_dir = "/home/ic/catalogs/em/images/thumb";

    opendir(DIR, $src_dir) or die "can't opendir $src_dir: $!";

    while (defined($file = readdir(DIR))) {
    if($file =~ /je?pg$/) {

    print "$src_dir/$file\n";
    print "$dest_dir/$file\n";
    # Create a thumbnail from 'test.jpg' as 'test_t.jpg'
    # using ImageMagick, or GD.
    my $t = new Image::Thumbnail(
    module => GD,
    size => 100,
    create => 1,
    inputpath => "$src_dir/$file",
    outputpath => "$dest_dir/$file",
    );

    }
    }

    HTH,
    Kevin
    --
    K Old <kold@kold.homelinux.com>

    K Old Guest

  4. #3

    Default Re: any easy library to create a thumbnail

    On Fri, 2003-09-12 at 21:02, K Old wrote:
    > On Fri, 2003-09-12 at 10:57, Ramprasad A Padmanabhan wrote:
    > > Hi all,
    > > I am trying to convert my gifs and png to thumbnails
    > >
    > > Does anyone know a library that can help me
    >
    >
    > Ram,
    >
    > I use Image::Thumbnail (available on CPAN) to convert jpegs, but I'm
    > sure there's a way to get gifs working. This module sits on top of GD
    > which can be trouble to setup.
    >
    > Anyway, here's a script I use to convert images to thumbnails:
    > #!/usr/bin/perl -w
    > use Image::Thumbnail;
    >
    > $src_dir = "/home/ic/catalogs/em/images/items";
    > $dest_dir = "/home/ic/catalogs/em/images/thumb";
    >
    > opendir(DIR, $src_dir) or die "can't opendir $src_dir: $!";
    >
    > while (defined($file = readdir(DIR))) {
    > if($file =~ /je?pg$/) {
    >
    > print "$src_dir/$file\n";
    > print "$dest_dir/$file\n";
    > # Create a thumbnail from 'test.jpg' as 'test_t.jpg'
    > # using ImageMagick, or GD.
    > my $t = new Image::Thumbnail(
    > module => GD,
    > size => 100,
    > create => 1,
    > inputpath => "$src_dir/$file",
    > outputpath => "$dest_dir/$file",
    > );
    >
    > }
    > }
    >
    > HTH,
    > Kevin
    Thanks pal
    But installing GD is a pain. And I realize perl is not a language to do
    image manipulation in.
    I have used a system call to 'convert' instead

    Thanks anyway
    Ram


    Ramprasad A Padmanabhan Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139