-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Program seems to find new compressions to make after multiple runs (?) #649
Comments
Hi @EnderNon, thanks for the report. Analysis of map_icon.png: The palette sorting evaluations are all tied for best result. When this happens it chooses the one that was performed first. I'll have to consider if there's anything we can improve here but my initial thought is to just keep it as-is. If we were to change it to, e.g., prefer the input baseline in the case of a tie, then you would be stuck with the first result and never achieve the smaller size of the second run. |
A somewhat naive initial idea I'm thinking is that choosing one of the tied sorts at random, or from some tuned probability distribution, could be an improvement overall if the expected final size is less than just always sticking with the first, but doing that comes with its own set of gotchas related to reproducibility... Perhaps there is something better than that though. |
Maybe, if running multi-threaded anyway, run all of these tied (& close-to-tied) palette sorts in parallel? Kinda like CPUs do predictive branching? |
Yeah, determinism is important. Perhaps we could just adjust the order so that, e.g. mzeng is preferred if we know it's usually the best one.
Indeed, I still plan to get around to #523 someday... |
See my commits here https://github.com/EnderNon/Wynntils-jpegnoise-fix
So basically what happened was:
oxipng -o max --strip all --alpha **/*.png
incommon/src/main/resources/assets/wynntils/textures
,oxipng -o max --strip all --alpha logo.png
incommon/src/main/resources/assets/wynntils
oxipng -o max --strip safe --alpha **/*.png
So for some reason, running the command once wasn't enough to achieve max savings - running it twice was necessary. Seems like a bug.
The text was updated successfully, but these errors were encountered: