This Batch script is designed to compress PNG images within a folder and its subfolders using pngquant
-
Download the repository and extract it to a location of your choice.
-
Run the script
Barotrauma_PNG_Compressor.bat
and it will automatically compress the PNGs to 50-90 quality by replacing the original files in '%LocalAppData\Daedalic Entertainment GmbH\Barotrauma\WorkshopMods\Installed' -
You can optionally round the images to the nearest multiple of 4 using
round-png.py
(Python 3.4+ required).
Previously it was resized by limiting the resolution to 4096, but this causes the sprites to be misaligned.
Rounding the images only changes by 1 pixel or 2, so there is no chance of the sprite being misaligned.