Name

compress — type of compression

Synopsis

$image->Set(compress=>string)
$image->Get('compress')

The default compression for an image is based on its original format; you can specify a compression type with the compress attribute. The value of string can be one of the following:

None
LZW
BZip
Runlength
JPEG
Zip

If you indicate a compression type that is incompatible with the output file type, it will simply be set to the original default value (e.g., a GIF file will ignore a compress attribute set to JPEG, or a PNG will ignore a compress attribute of Zip).

Get Programming Web Graphics with Perl and GNU Softwar now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.