Efficiently store Visual Novel cgs by using a multi-image format for storing all variations of one image in one file. This way, only the differences need to be stored which reduces the file size significantly.
GNU General Public License v3.0
16
stars
1
forks
source link
Base image could be a combination of all the images #8
It is most commonly noticed with eyebrows:
The eyebrow moves, and the overlay image contains both erases the old eyebrow and paints the new one. Total size: 33,454 bytes
An alternative way would be to use a base image which contains no eyebrows, and two overlays just adding the eyebrows:
Total size: 33,046 bytes
Since the base image is simpler now, it got reduced with 458 bytes (from 30,068 bytes).
The two diff images are however larger by 50 bytes, but this can be removed by storing them in the same image like this:
It is now smaller with 64 bytes, thus smaller than the original diff image as well. Worth doing this for 64 bytes? Probably not, but something to think about nevertheless.
It is most commonly noticed with eyebrows: The eyebrow moves, and the overlay image contains both erases the old eyebrow and paints the new one. Total size: 33,454 bytes
An alternative way would be to use a base image which contains no eyebrows, and two overlays just adding the eyebrows: Total size: 33,046 bytes
Since the base image is simpler now, it got reduced with 458 bytes (from 30,068 bytes). The two diff images are however larger by 50 bytes, but this can be removed by storing them in the same image like this: It is now smaller with 64 bytes, thus smaller than the original diff image as well. Worth doing this for 64 bytes? Probably not, but something to think about nevertheless.