akabekobeko / npm-icon-gen

Icon file generator for Windows, macOS, Web
MIT License
157 stars 29 forks source link

Change the `compressionLevel` of png in sharp #138

Closed akabekobeko closed 3 years ago

akabekobeko commented 3 years ago

Change the compressionLevel of png in sharp.

options.compressionLevel number zlib compression level, 0 (fastest, largest) to 9 (slowest, smallest) (optional, default 6)

Currently, it is #136 and is set to 9. However, we want to prioritize quality over size, so default to 6 or the highest quality 0.

akabekobeko commented 3 years ago

This value was for the compression size and processing time as explained. Setting it to 0 does not change the quality of the image, and since PNG itself is a lossless compression, the current value of 9, which gives priority to size, is fine.