Remove transparency from PNGs

2023-12-16

This is a mini tutorial

Context: https://github.com/Archtec-io/bugtracker/issues/137

You can strip transparent pixels with the following command:

remtransp() { convert -flatten "${1}" "${1}" && optipng -o7 -zm1-9 -nc -strip all -clobber "${1}"; }

remtransp mymod_mytexture.png

Your system must have convert (ImageMagick) and optipng installed. To run the remtransp command, move the first line from the code box above into one of your bash config files (e.g. ~/.bashrc).

Enter your instance's address