![]() |
KTX Tools Reference 5.0.0
Libraries and tools to create and read KTX image texture files.
|
Convert another texture file type to a KTX2 file
ktx convert [option...] input-file [output-path]
ktx convert converts the file specified as the input-file argument to KTX v2 and saves it in the output-path. If the input-file is '-' the file will be read from the stdin. If the output-path is '-' the output file will be written to the stdout. If output-path is a directory, the output is saved to a file in that directory whose name is the stem of the value given in input-file with the extension ktx2. If no output-path is provided, the output is saved to a file whose name is the parent path and stem of the value given in input-file with the extension ktx2.
The input file must be of a supported file type. Currently the only supported type is KTX v1. Generates an error if the input file type is unrecognized.
To encode or supercompress the converted file, pipe it to ktx encode or ktx deflate via stdout.
Unrecognized metadata with keys beginning "KTX" or "ktx" found in an input KTX v1 file, is dropped and a warning is generated.
GL_COMPRESSED_RGBA_ASTC_*_KHR are mapped to the equivalent VK_FORMAT_ASTC_*_SFLOAT_BLOCK. In order to display images from the converted file, applications using Vulkan must therefore enable the VK_EXT_texture_compression_astc_hdr extension and its textureCompressionASTC_HDR feature. Using these formats, Vulkan implementations will render both HDR and LDR blocks within the images. With the alternative mapping to VK_FORMAT_ASTC_*_UNORM_BLOCK they will render HDR blocks in the error color.The following options are available:
ktx. Case insensitive. ktx.