It would be great to have the ability to set custom key/value pairs for KTX2 files. For example, this could be used to store additional information about the target transcoding format, texture content, or channels.
The KTX2 format already includes a mechanism to handle this. We just need a way to pass basist::ktx2_transcoder::key_value_vec ktx2_key_values during compression. As a solution, this could be added to the basis_compress2() arguments:
void* basis_compress2(
basist::basis_tex_format mode,
const basisu::vector<image>& source_images,
uint32_t flags_and_quality, int quality_level, int effort_level,
size_t* pSize,
image_stats* pStats = nullptr,
const key_value_vec* pKeyValueVec = nullptr);
The KTX2 specification supports custom, non "KTX..." keys and describes how they should be handled.
It would be great to have the ability to set custom key/value pairs for KTX2 files. For example, this could be used to store additional information about the target transcoding format, texture content, or channels.
The KTX2 format already includes a mechanism to handle this. We just need a way to pass
basist::ktx2_transcoder::key_value_vec ktx2_key_valuesduring compression. As a solution, this could be added to the basis_compress2() arguments:The KTX2 specification supports custom, non "KTX..." keys and describes how they should be handled.