ktx_transcode(1)
π ktx_transcode β girl, let's transcode
Okay so this is ktx_transcode(1) from the KTX Tools Reference β yes, the real deal, manual page and all, and I'm gonna walk you through it like we're texting at 2am. π«Ά
β¨ NAME β¨
ktx_transcode β ktx transcode. That's it, that's the vibe.
Transcode a KTX2 file. Periodt. π
π¦ SYNOPSIS π¦
ktx transcode [option...] input-file output-file
πΈ DESCRIPTION πΈ
Okay so ktx transcode literally takes the KTX file you named as the input-file argument, transcodes it, optionally supercompresses the result, and saves it as the output-file. No cap, that's the whole flow. π
Wanna get spicy? If the input-file is -, the file gets read from stdin. And if the output-path is -, the output file gets written to stdout. Streamy icon behavior. π
The input file must be transcodable β bestie, that means it's either BasisLZ supercompressed or it has the UASTC color model in the DFD. Non-negotiable, that's the vibe check. π§
And if the input file is invalid? The first encountered validation error gets displayed to stderr and the command exits with the relevant non-zero status code. Not me getting called out in public like that π β but at least you know exactly what went wrong.
π₯ OPTIONS π₯
The following options are available. Buckle up, there's not that many, we can do this. π
--target <target>β The target transcode format. If the target option is not set, ther8,rg8,rgb8orrgba8target will be selected based on the number of channels in the input texture. Auto-detect queen behavior π. Block compressed transcode targets can only be saved in raw format β so don't come for them with anything else. Case-insensitive, too. Possible options are:etc-rgb|etc-rgba|eac-r11|eac-rg11|bc1|bc3|bc4|bc5|bc7|astc|r8|rg8|rgb8|rgba8. Quick lore drop:etc-rgbis ETC1;etc-rgba,eac-r11andeac-rg11are ETC2. Iykyk. π--zstd <level>β Supercompress the data with Zstandard. ποΈ Cannot be used with ETC1S / BasisLZ format β that combo is a no. Level range is[1,22]. Lower levels give faster but worse compression. And values above20should be used with caution as they require more memory β highkey don't go feral with it, your RAM is a whole main character too. π--zlib <level>β Supercompress the data with ZLIB. Cannot be used with ETC1S / BasisLZ format either. Level range is[1,9]. Lower levels give faster but worse compression. Same deal, just a smaller range. π-h,--helpβ Print this usage message and exit. Your get-out-of-jail card. π-v,--versionβ Print the version number of this program and exit. Slay, now you know what you're running. β
π EXIT STATUS π
Every single one, bestie, no skipping:
0β Success π1β Command line error2β IO failure3β Invalid input file4β Runtime or library error5β Not supported state or operation6β Requested feature is not yet implemented
Memorize these fr fr, they're literally your diagnostic cheat sheet. β¨
π HISTORY π
Version 4.0
- Initial version β the origin story, the debut, the first era. πΈ
π AUTHOR π
- MΓ‘tyΓ‘s CsΓ‘szΓ‘r [Vader], RasterGrid www.rastergrid.com
- Daniel RΓ‘kos, RasterGrid www.rastergrid.com
Legends, honestly. Respect the architects. π«Ά
Little reminder before you go: block compressed transcode targets can only be saved in raw format, and--zstd/--zlibcannot be used with ETC1S / BasisLZ format. Don't be that girl who finds out the hard way. π
And that's the page, bestie! π This iconic little manual is Version 0.0.0, dated Tue Jan 1 1980 00:00:00 β yeah, that timestamp is giving time-traveler, but that's what the footer says, so we're honoring it. ktx_transcode(1) out, mwah πβ¨
π¦ where this page comes from
- nixos 26.05: ktx-tools 4.4.2
- nixpkgs unstable: ktx-tools 4.4.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms