Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Setting png compression level in Imager -- GD

by Discipulus (Canon)
on May 12, 2018 at 12:52 UTC ( [id://1214416]=note: print w/replies, xml ) Need Help??


in reply to Setting png compression level in Imager

Hello Anonymous Monk,

GD uses png compression.

> The optional $compression_level argument controls the amount of compression to apply to the output PNG image. Values range from 0-9, where 0 means no compression (largest files, highest quality) and 9 means maximum compression (smallest files, worst quality). A compression level of -1 uses the default compression level selected when zlib was compiled on your system, and is the same as calling png() with no argument.

See it explained GD docs.

I used png compression in my picwoodpecker -- a Tk program to choose and modify your photos (<- upvote here ;) that now is on github (<- newer version here ;)

Iirc the compression worked but in the windows machine where I'm now seems to not to have effect on the size/quality of the output (missing zlib?).

Try my (wonderful!) program above perl picwoodpecker.pl -pngcompression 0 go to advanced and set the output to png then use copy this photo from the main ineterface. Retry with -pngcompression 9

HtH

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1214416]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-04-19 15:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found