Quality Quantization
This release features colour quantization of images using 3 high quality algorithms: Neu Quant, Scolorq, and Wu Bipartition. These quantization methods are now used by the GIF encoder. A fair amount of work has gone into more extensive image loading especially for block-compressed formats. KTX and KTX2 are now supported and all block formats (KTX, KTX2, DDS, and ASTC files) support the full compliment of the newer ASTC compression modes (adaptive scalable texture compression).
ASTC file loading (ARM .astc files) supports both LDR and HDR colour profiles. Support for loading and saving the lossless QOI (Quite OK Image) format has been added. GIF file encoding now supports transparency.
Supporting changes include a new palettized image class, a new tightly packed bit-array class (tBitArray8), and an abstract base for all image classes to help standardize the interfaces for different image types.
Additional fixes and changes:
- HDR dds formats (which can be exported from nVidia texture tools) can now process exposure on load.
- Reinhard tonemapping implemented.
- Standardize base image loader interface.
- DDS loader defaults to sRGB compression for gamma-correction instead of the simpler power-function.
- Official LibKTX used for ktx/ktx2 file parsing.
- tPrintf supports width specifier for %c. Added support for %B to easily print booleans.
- KTX/KTX2 loading support for formats: BC1, BC2, BC3, BC4, BC5, BC6U, BC6S, BC7, L8, A8, R8, R16F, R32F, R8G8, R16G16F, R32G32F, R8G8B8, R8G8B8A8, R16G16B16A16F, R32B32G32A32F, B8G8R8, B5G6R5, B8G8R8A8, B4G4R4A4, B5G5R5A1, plus all 14 ASTC formats for block sizes from 4x4 to 12x12.
- Improved animated APNG detection inside PNG files.
- QOI loading and saving of 24 and 32 bit images.
- Added tBitArray8 type and ability to set and get multiple bits in one function call for both tBitArray and tBitArray8.
- tPaletteImage class for storing palettized image data at varying bit-depths and palette sizes.
- Reverse and Find bit operations for basic types added to the foundation module.
- Functions to convert between palettized colours and flat pixel arrays.
- Standard quantization interface created. Implements 4 quantization methods: Fixed, Wu, Neu, and Scolorq. Fixed is a non-adaptive predetermined palette and the redmean colour distance function is used to find the closest match.
- Saving GIF files now supports high-quality quantization (palette generation) at various bit-depths from 1bpp (2-colour) to 8bpp (256-colour).
- Saving GIF files now uses gifenc to encode. This change allowed transparency to be supported.
- Scolorq supports dithering. Unit-tests added for various levels of dither.