- Jul 10, 2020
- 963
- 2,413
I've been repackaging some games, generally while using lossless image compression. Basically I've spending days using a brute force solver on the various zlib parameters to make the PNG header smaller.
I'm now looking at
Let me give an example, with thumbnails (click for full size):
Before compression:
After compression:
Flipping back and forth you can see there are tiny changes. In this case they aren't even visible to the user as this is in motion (rotating).
Here's another example:
Here you see an ever so slight shift in the colors, most notable the foam on the water goes from a blueish color to more white.
The results are impressive to say the least. If I look at Succubus Farm:
Smaller assets have a number of advantages including:
I'm now looking at
You must be registered to see the links
.Let me give an example, with thumbnails (click for full size):
Before compression:
This is approximately 2.4 MB before header compression. It is 2.3 MB after header compression. Finding optimal zlib settings for all the PNG files in this game took about 24 hours.
After compression:
This is approximately 657 KB or 28% of the original size. Lossy compression of all the PNG assets took about 15 minutes.
Flipping back and forth you can see there are tiny changes. In this case they aren't even visible to the user as this is in motion (rotating).
Here's another example:
Here you see an ever so slight shift in the colors, most notable the foam on the water goes from a blueish color to more white.
The results are impressive to say the least. If I look at Succubus Farm:
Lossless compression:
PNG assets go from 583,635,069 bytes to 322,068,011 bytes by compressing headers alone or 55% of the original size.
Lossy compression:
PNG assets go from 583,635,069 bytes to 115,033,463 bytes or 19% of the original size.
Smaller assets have a number of advantages including:
- Faster download times (less cost for metered connections)
- Faster load times
- Less memory usage
- Less disk space usage