KTX Tools Reference 4.3.2
Libraries and tools to create and read KTX image texture files.
Loading...
Searching...
No Matches
ktx transcode

Transcode a KTX2 file.

SYNOPSIS

ktx transcode [option...] input-file output-file

DESCRIPTION

ktx transcode can transcode the KTX file specified as the input-file argument, optionally supercompress the result, and save it as the output-file. 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. The input file must be transcodable (it must be either BasisLZ supercompressed or has UASTC color model in the DFD). If the input file is invalid the first encountered validation error is displayed to the stderr and the command exits with the relevant non-zero status code.

The following options are available:

--target <target>
Target transcode format. If the target option is not set the r8, rg8, rgb8 or rgba8 target will be selected based on the number of channels in the input texture. Block compressed transcode targets can only be saved in raw format. Case-insensitive. Possible options are: etc-rgb | etc-rgba | eac-r11 | eac-rg11 | bc1 | bc3 | bc4 | bc5 | bc7 | astc | r8 | rg8 | rgb8 | rgba8. etc-rgb is ETC1; etc-rgba, eac-r11 and eac-rg11 are ETC2.

--zstd <level>
Supercompress the data with Zstandard. Cannot be used with ETC1S / BasisLZ format. Level range is [1,22]. Lower levels give faster but worse compression. Values above 20 should be used with caution as they require more memory.
--zlib <level>
Supercompress the data with ZLIB. Cannot be used with ETC1S / BasisLZ format. Level range is [1,9]. Lower levels give faster but worse compression.
-h, --help
Print this usage message and exit.
-v, --version
Print the version number of this program and exit.

EXIT STATUS

  • 0 - Success
  • 1 - Command line error
  • 2 - IO failure
  • 3 - Invalid input file
  • 4 - Runtime or library error
  • 5 - Not supported state or operation
  • 6 - Requested feature is not yet implemented

HISTORY

Version 4.0
  • Initial version

AUTHOR

  • Mátyás Császár [Vader], RasterGrid www.rastergrid.com
  • Daniel Rákos, RasterGrid www.rastergrid.com