perleager has asked for the wisdom of the Perl Monks concerning the following question:
Everything works for me, the upload and the creation of the thumbnail. However, when checking the file size of the thumbnail, I noticed that it was larger then the original. Can anyone explain to me why this is happening? Only reason I can think of is that Image::Magick adds other features to the image, thus creating it to be larger? I tried resizing an image so that its a thumbnail in Adobe Photoshop, and the filesize of the thumb was significantly lower.if ($chart_name ne "") { my ($Bytes, $Buffer); open OUTPUT, ">", $chart_f or die "Can't open: $!"; binmode OUTPUT; #binmode since I'm on Windows while ($Bytes = read($fh, $Buffer,1024)) { print OUTPUT $Buffer; } close OUTPUT or die "Can't close: $!"; use Image::Magick; my $image = Image::Magick->new; my $x = $image->Read($chart_f); $x = $image->Thumbnail(width=>240, height=>153); warn "$x" if "$x"; $x = $image->Write($chart_thumb); warn "$x" if "$x"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Image::Magick - Changing Quality?
by zentara (Cardinal) on Apr 29, 2006 at 11:44 UTC | |
|
Re: Image::Magick - Changing Quality?
by bart (Canon) on Apr 29, 2006 at 16:39 UTC |