ktx_transcode(1)

πŸ“¦ version 4.4.2, in nixos 26.05, nixpkgs unstable

πŸ’… 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, the r8, rg8, rgb8 or rgba8 target 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-rgb is ETC1; etc-rgba, eac-r11 and eac-rg11 are 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 above 20 should 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 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

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 / --zlib cannot 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