Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSet PNG compression optimization level via CLI #1290
Comments
|
@heinezen can i work on these one ? |
|
No need to ask for permission, just do it and submit a pull request :) |
|
@dev-patel2104 You can :) The most relevant code snippets are here: and here: |
|
I would recommend you migrate to webp. I tested this recently on a few projects and there is pretty much 20% of bytes saved over lossless, fully optimized PNGs across the board. |
|
@janisozaur Interesting. Do you have more info about the decoding speed and memory usage? |
|
No, sorry. I haven't checked. Decoding speed was not a concern for me and memory usage should be similar to PNG - after all it's only decoding into buffer that would be exactly the same whatever the original format was. |
|
According to webp devs themselves, it's pretty much better across the board: https://developers.google.com/speed/webp/docs/webp_lossless_alpha_study (see table 3 for decoding) |
|
@janisozaur If it has better decoding speed that's a big plus :) Even better would be a GPU implementation, but I do not see anything about that yet. I might implement experimental support for it in the converter. Should not be too hard to do. |


Required skills: Python, maybe Cython
Difficulty: Easy
Our converter PNG export module supports 3 built-in compression levels
However, this functionality is currently unused as the converter is hardcoded to always use the default compression setting. We should implement a way to set the desired compression level with a CLI flag. The CLI flag should be added to the main
convertmodule creating the modpacks as well as theconvert-filesubmodule that can convert standalone files.