Closed ace-dent closed 8 months ago
Could you post the options you're using? I'm getting 50,334 with -saZo6
.
@andrews05 - it has gone through some other software. However, the issue of low -vs- high complexity alpha fill should be repeatable.
I tried putting with low complexity one through oxipng with -sZo6 --force
(no alpha) and it came out at 50,333, only 1 byte difference. So I'm not sure the alpha is really a factor in the size difference you're seeing above - it may simply come down to better compression or filtering.
Thanks @andrews05 for testing and comments. I'm new(ish) to this area of optimization... but more from intuition, the oxipng image seems to introduce higher entropy... I will be testing more in future. :-) Feel free to Close in the meantime.
from intuition, the oxipng image seems to introduce higher entropy
It sure does appear that way. However, appearances can be deceiving 😉 The alpha optimisation works by setting all the underlying values to 0 (more or less). As the filter changes for each line it makes for an interesting appearance when the image is decoded.
Using oxipng with
-a
to alter RGB values for fully transparent pixels, may not always yield optimal results. See attached examples.Original (52,385 bytes):
Processed with oxipng (50,264 bytes) ... and alpha stripped to reveal underlying RGB :
Processed with FileOptimizer (49,762 bytes) ... and alpha stripped to reveal underlying RGB :
Is there scope in the current process to evaluate simpler 'dirty alpha' fills?