Packed Floats and Pixel Formats
This release introduces experimental support for loading and decoding PowerVR images, extends pixel-format support for image container formats (DDS, KTX, and PVR), adds new packed floatng-point classes, improves the drive-information API (especially for removeable media), updates the PNG loading library, and allows saving/loading of meta-data to disk. PBC = Possible Breaking Change.
Features
- Saving and loading of image tMetaData to/from tChunk binary format.
- Meta-data focal length is in mm.
- Updated libpng from 1.6.37 to 1.6.40.
- Detection of JPG/JFIF content inside a PNG file. Some phone software generates these 'invalid' images and now they will load.
- Better handling of corrupt tga files that used to cause a buffer overrun. We now check that we're in bounds.
- PVR supprt for V1, V2, and V3 files.
- Cleaned-up and consistently named interpolation and extrapolation functions. PBC.
- tGetDriveInfo now reports drive state: Ready, NotReady, or Unknown.
- Added public-facing UTF functions that are capable of returning the number of codeunits that could or would be read. The codeunit count can be determined for UTF-8, UTF-16, and UTF-32.
- Consistent naming of all pixel-formats. PBC.
- Introduced satellite information for channel-type (UNORM, SNORM, UINT, UFLOAT, etc). PBC.
- Changed the behaviour of tString ExtractLeft and ExtractRight for the case where the divider was not found. If not found the string now remains unmodified and an empty string is returned. This more closely matches the bahaviour of the non-char overloads. PBC.
- Packed small-float classes. F11F11F10 is a 32-bit packed format supporting 2xE5M6 and 1xE5M5 floats (no sign bit). M9M9M9E5 is a 32-bit packed format supporting 3xE5M9 (3xF14) but with a shared 5-bit exponent and no sign bit. Because of the shared exponent this format does not used normalized mantissa (always denorm).
- Support for exotic pixel-formats including PVRBPP2, PVRBPP4, R11G11B10uf, E5R9G9B9uf, R8G8B8M8, R8G8B8D8 plus integral types R16, R16G16, R16G16B16, R16G16B16A16 and their 32-bit-per-component counterparts. Where supported these formats may be contained by DDS, KTX, KTX2, and PVR (V1, V2, V3) files.
Improvements and Fixes
- Unit test for saving and loading meta-data to a tChunk file. Added operator== and != for both tMetaDatum and tMetaData.
- Deborder picture function now returns false if there is no change.
- Consistent use of load params across all image loaders that need them. JPG and PNG now have params instead if just a set of flags. PBC.
- The naming for the PVRTC pixel formats is finalized so they are unambiguous. For version 1: "PVRBPP4", "PVRBPP2", "PVRHDRBPP8", and "PVRHDRBPP6". For version 2: "PVR2BPP4", "PVR2BPP2", "PVR2HDRBPP8", and "PVR2HDRBPP6". Updated the remaining pixel-format query functions and added a tIsLDRFormat in addition to tIsHRDFormat. Note that for the ".pvr" container format (as opposed to the pixel format) it comes in 3 versions (V1 V2 V3) but all use the same "pvr" extension.
- Fixed issue where tGetDriveInfo was not filling out the drive letter correctly.
- tString convenience functions for dealing with known null-terminated strings.
- The state of tImageDDS and specifically the IsValid call could give bad results if a file load wasn't attempted. The Results bitfield is now a more general current State and the IsValid works for all cases. The fix has been propagated to tImageKTX and tImagePVR.
- If possible, the DDS loader will now set the channel-type - modern dds pixel formats allow it to be determined in some cases.
- Channel-type determined for VK packed formats in KTX2 files.
- ICO files always considered to be in sRGB colour profile.
- Now handle both unsigned and signed versions for BC4 and BC5. These new ATI1 and ATI2 variants are supported in dds, ktx, ktx2, and pvr files. All BC formats exportable by PVRTexTool are now loadable.
Full Changelog: v0.8.16...v0.8.17