Ask a Question related to PERL Beginners, Design and Development.
-
Ramprasad A Padmanabhan #1
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
-
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 -
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... -
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... -
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;... -
Create Thumbnail
If you can use GD2 library use this function function create_resampled_image($max_height, $max_width, $image_quality, $image, $newimage){... -
K Old #2
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
-
Ramprasad A Padmanabhan #3
Re: any easy library to create a thumbnail
On Fri, 2003-09-12 at 21:02, K Old wrote:
Thanks pal> 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
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



Reply With Quote

