beginer's question~ about image size

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
ycul

beginer's question~ about image size

Post by ycul »

I need to convert some tiff images with Group4 compression, and scale the image to fit 5800*5800.

I did this....

$x = $image->Set(compression=>'Group4');
warn "$x" if "$x";
$x = $image->Scale(width=>$newW, height=>$newH);
warn "$x" if "$x";

the image I got was scales to the right size, but the file size is HUGE, turns from 150K to 50MB!

Plus the image's compression is still none.

Thanks.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

Scale() introduces new colors so the image is no longer monochrome, a requirement for Group4 compression. Instead, use Sample() which does not introduce new colors.
ycul

thanx

Post by ycul »

very helpful! Thanx
Post Reply