From Ren'Py Visual Novel Engine
JCC - JPEG Compression of Character Art
JCC is a technique that replaces a single PNG image with two JPEG images, one for color data and one for alpha. Ren'Py recombines the JPG images, allowing the image to be reconstructed memory. As JPEG uses lossy compression, this technique allows one to trade small amounts of image quality for large reductions in disk space and download size.
End User: The only requirement for the end user of JCC is that the game they're playing be made with Ren'Py 6.3.3 or greater.
Developer: The JCC tool requires:
It's expected that the developer knows how to run a Python script on his or her system.
To convert the images used in your game to use JCC, place the jcc.py script in the game directory of your project, and run it. This will do two things:
- All PNG files with filenames like filename.png underneath the game directory will be moved to filename.png.bak, and will have filename.png.base.jpg and filename.png.mask.jpg created to store the JPEG-compressed data.
- A script file, jcc.rpy, is added to the game directory. This file contains code that causes Ren'Py to use the compressed files.
Note that this will compress all PNG files in the game directory, losing some quality in the process. There are some files that you may not want compressed, such as the frame of the text window, or SFonts. You should restore these png files from the backups, and delete the corresponding jpg files.