Closed reoseah closed 5 years ago
Does it decrease bit depth? If yes, that would be catastrophic
I have done some research on the program and it does seem like it makes the images 8bit, which as liach stated isn't great for us.
What compression option did you use?
default ones xD
by the way, I just quickly run it just as experiment after seeing coderbot's post in discord
coderbotСегодня, в 0:31 Terrestria is 1MB because there's like 150 16x16 textures
I think that I'll convert this into an issue instead of a pull request, We do need to look into compression, but I dont think that this option is the best at the time. There are more lossless methods to image compression that we will look into in the future. Thanks for the PR, but we may have to look into a more lossless way of doing it.
We can discuss image compression options here: https://github.com/TerraformersMC/Terrestria/issues/84
IMO this should have been merged; PNGGauntlet and OptiPNG are both completely lossless.
Does it preserve the color of fully transparent pixels? I remember having loads of issues with texture compression in the past because minecraft uses the color of fully transparent pixels and most of these nuke them for optimization.
Yeah I was going to mention that
OptiPNG and possibly PNGGauntlet "reduce bit depth" by detecting existing palettes and making use of paletted mode; it's lossless.
What you're mentioning with opaque pixels is not these optimizers being lossy, or Minecraft using information they remove; it's a longstanding bug in ImageIO's PNG loader related to transparent colors in palette mode. Toolkit does not exhibit this behavior, and neither does the sixlegs PNG decoder from long ago.
The only good way to deal with this is disable palettization; in OptiPNG this can be done with -nx
It could make sense to just apply compression to opaque textures, since those won't result in issues when compressed with OptiPNG.
That is an option.
In PNGGauntlet there's no OptiPNG settings exposed apart from optimization level, unfortunately. There's a bug in OptiPNG in that if you'll run PNGGauntlet second time on same images it still converts them to paletted mode. You'll have to go to OptiPNG settings and either disable it at all, or set optimization level to 0.
Without palletization it makes png files about 1.5-2 times larger, but that's still about 4 times less than when Photoshop saves.
compressed all images (used freeware PNGGauntlet)