mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-07-25 16:45:03 -04:00
Safe Compression Commit
Only a single program was used to safely compress all textures in MTG. This was done using optipng with the following settings: ``` optipng -o7 -zm1-9 -nc -strip all -clobber %%f ``` The key command used is -nc, which stops color mode changes. I.e. any RGBA textures will remain RGBA textures, with none being changes to 8-bit indexed mode. The resulting compression: | type | size (Bytes) | % of original texture size | | --- | --- | --- | | Original | 247,571 | 100% | | Compressed | 152,189 | 61.5% | **Summary: Saves 93.14 KB** A script has been added: utils/optimize_textures.sh which will perform this compression automatically, assuming optipng is installed.
This commit is contained in:
parent
624dafc12b
commit
454bb6dc7f
228 changed files with 6 additions and 0 deletions
6
utils/optimize_textures.sh
Normal file
6
utils/optimize_textures.sh
Normal file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Colors with 0 alpha need to be preserved, because opaque leaves ignore alpha.
|
||||
# For that purpose, the use of indexed colors is disabled (-nc).
|
||||
|
||||
find -name '../*.png' -print0 | xargs -0 optipng -o7 -zm1-9 -nc -strip all -clobber
|
Loading…
Add table
Add a link
Reference in a new issue