Apply an aggressive set of ultimately deterministic optimizations to
raster image files where an actual file size reduction of not less than
50% was possible without the removal of intrinsic properties such as
alpha channels. Rendered image dimensions were always left unchanged.
The primary mechanisms employed during optimization are:
- PNG color mode conversion from TrueColor to indexed palette
+ Accomplished using NeuQuant neural-net color quantization algorithm
- Stripping of data blocks containing irrelevant information, such as:
+ XMP metadata fields
+ Embedded comment fields
+ ICC color profiles (simple graphics with basic color schemes only)
+ EXIF profiles
- Re-compression using "best" or "smallest" profile presets
All modifications are performed on lossless image formats and closely
visually inspected after processing to ensure no loss of apparent
details or introduction of new, unwanted artifacts.
Toolset used:
- RIOT (Radical Image Optimization Tool), v2024.1.0 64-bit
- AdvanceCOMP (part of the Advance Projects), v2.6 64-bit
- optiPNG, v7.9.1 64-bit
- PNGOUT, v2015.02.13 32-bit
Signed-off-by: Peter J. Mello <admin@petermello.net>
Set USE_CTRULIB_2=1 to build with libctru 2.0. When unset, this code
is compatible with the older toolchain.
Some 2.0 changes addressed rare problems in earlier versions:
- Save / restore stack pointer for init / exit
Otherwise, it could be outside of the range we deallocate.
- Run aptMainLoop in the audio driver to react correctly to sleep events
Other changes for 2.0:
- Remove ninjhax1 -- requires outdated APIs that have been removed
- Switch from __sync_arbiter to syncArbitrateAddress
- Use implicit gxCmdBuf
- Use gpuPresentBuffer for double buffering