Ask a Question related to PERL Modules, Design and Development.
-
Gary Mayor #1
Image::Magick scale smaller makes file size bigger
Hi,
The problem is i'm using Image Magick to create thumbnails smaller
images out of large ones. 99% of the time this works great but there's
1% where the thumbnail has a bigger file size then the original image
and that I can't understand. The code i'm using is below and I hope
someone knows what this might be. I've tried resizing and saving the
images in gimp and the sizes turn out correct. Also if I compress the
image the size does decrease but why would a image with no compression
turn out bigger than the original. I also tried adding the icmp or
whatever it was to the code but that didn't make any difference. How can
this be anyone know?
Thanks
Gary
my $imager = Image::Magick->new;
die unless ref $imager;
my $status = $imager->Read("$infile");
print "Read: $status\n" if $status;
$height = $imager->Get('height');
$width = $imager->Get('width');
my $ttwidth = 100;
my $tbheight=1;
my $tbwidth=1;
my $fixed=$ttwidth;
my $scalefix=1;
my $scalefactor=$width/$fixed;
$tbheight=$height/$scalefactor;
$tbwidth=$fixed;
$count++;
$original[$count] = $cfile;
$status = $imager->Write(filename=>"$dir/$cfile");
$imager->Scale( width=>$tbwidth, height=>$tbheight );
$imager->Set(Quality=>$compression);
$new[$count] = "$outfile";
$status = $imager->Write(filename=>"$dir/$outfile",compression=>'JPEG');
Gary Mayor Guest
-
Image::Magick - size limitation?
I am using the following script to manage image database. I understand it is primitive, but it's ok for me for this case. Don't mind Common:: stuff... -
Changing scale/size of a placed image
I am wondering how to change the scale (ie: scale something down) of an image I place in an InDesign document. Tried doing this the same way as is... -
Need to Make Smaller File Size
I scanned 80 pages into my computer and converted to a .PDF. File size is 15 MB. I need to email to a colleague. Is there a solution to make this... -
scale a projector to a smaller size....
Is there an xtra that can scale my projector size to the size of the users monitor? I normally use an xtra that can change the monitor size... -
plugger-4.0 shows Image Magick gif of a cartoon wizard rather than tiff file in netscape plugin
Re-post, didn't make it to usenet last few times. Subject: plugger-4.0 shows Image Magick gif of a cartoon wizard rather than tiff file in...



Reply With Quote

