I'm trying to compress large images to very small filesizes. I found that without an alpha channel, I could compress a 47MB PNG down to a 400KB Webp with q=50. The image looks good.
With an alpha channel, my 67MB PNG compresses down to 2.7MB image. This is far above the range I expected from not having an alpha channel. This was with alpha_q=80. I tried reducing alpha_q further but the PALETTE was very obvious and the image looked very bad.
Command Line results are Below.
The alpha compression seems to be lossless from the result (Lossless-alpha compressed size: 2433316 bytes). Is there some flag to turn on lossy alpha compression that I missed? Does cwebp not compress the alpha channel the same way that is compressed the color channels? Is there any way to remediate this, and keep my alpha channel around the same quality as the colors? Thank you very much for your time.
cwebp img_rgba.png -q 50 -m 4 -alpha_q 80 -o img_rgba_q=50_alphaq=80_m=4.webp
Saving file
img_rgba_q=50_alphaq=80_m=4 '
File:
img_rgba.png
Dimension: 7360 x 4912 (with alpha)
Output: 2731300 bytes Y-U-V-All-PSNR 44.90 45.87 45.81 45.20 dB
block count: intra4: 31026
intra16: 110194 (-> 78.03%)
skipped block: 39800 (28.18%)
bytes used: header: 284 (0.0%)
mode-partition: 113012 (4.1%)
transparency: 2433317 (58.3 dB)
Residuals bytes |segment 1|segment 2|segment 3|segment 4| total
macroblocks: | 0%| 2%| 8%| 89%| 141220
quantizer: | 52 | 52 | 45 | 37 |
filter level: | 21 | 63 | 63 | 39 |
Lossless-alpha compressed size: 2433316 bytes
* Header size: 4335 bytes, image data size: 2428981
* Lossless features used: PREDICTION
* Precision Bits: histogram=7 transform=5 cache=0
* Palette size: 78