TEXTURECONVERTER(1) General Commands Manual TEXTURECONVERTER(1)

TextureConverter — compress, decompress, convert, compare and examine GPU textures

TextureConverter [options] input ...

TextureConverter --h | --help

TextureConverter --version

TextureConverter is the command-line interface to AppleTextureConverter(3). It reads an image or texture file, can resize it and generate mipmaps, and writes the result in a compressed or uncompressed GPU pixel format to a texture file. This page describes version 5.2.240000.

The --mode option selects the operation; the default is Compress. Each operation takes one input file, except when --build_array, --build_cubemap, --build_volume or --build_mips combine several inputs into one texture. The inputs must load with the same pixel format, so an 8-bit and a 16-bit PNG cannot be combined. --build_cubemap takes exactly six inputs, in +X, -X, +Y, -Y, +Z, -Z order.

Options take the form --name or --name=value. Named values such as modes, filters and compressors are not case-sensitive.

Decode KTX ASTC images as HDR.

Sets ATC_Options.isASTCHDR.

Also compute the expensive advanced metrics (SSIM, MS-SSIM, normal-map angular error) when reporting metrics.

Sets ATC_Options.advancedMetrics.

=value
Alpha mode.

Ignore alpha.
Pre-multiply color by alpha.
Preserve alpha.

Default: ‘Ignore’.

Sets ATC_Options.alphaMode.

=value
Alpha reference for alpha to coverage.

Default: ‘0.95’.

Sets ATC_Options.alphaReference.

Use alpha to coverage.

Sets ATC_Options.useAlphaToCoverage.

Use alpha weight when compressing.

Sets ATC_Options.useAlphaWeight.

Build a 2D texture array by combining input textures. Can not be combined with --build_cubemap, --build_volume or --build_mips.
Build a cubemap by combining input textures. Input textures should be specified in +X/-X/+Y/-Y/+Z/-Z order. Can not be combined with --build_array, --build_volume or --build_mips.
Build a 2D mip mapped image by combining input textures. Only 2D source images can be combined and each image must be half the width and height of the previous image. Can not be combined with --build_array, --build_cubemap or --build_volume.
Build a volume by combining input textures. Can not be combined with --build_array, --build_cubemap or --build_mips.
=value
Channel weighting.

Use linear weighting (1.0, 1.0, 1.0, 1.0).
Use perceptual weighting (0.299, 0.587, 0.114, 1.0).

Default: ‘Perceptual’.

Sets ATC_Options.channelWeighting.

Compare the date/time of the source file to the output file (if present) & skip compression if the output file is newer. Can be combined with --check_details.
Compare the compression options and TextureConverter version against the output file (if present) & skip compression if not needed. Only supported for KTX files. Can be combined with --check_date.
=value
Comparison file path.
=value
Compression format.

Required in Compress mode. See COMPRESSION FORMATS for the formats each compressor accepts.

Default: ‘None’.

Sets ATC_Options.format.

=value
Compression quality.

Fastest/lowest-quality compression. Best avoided for release builds.
Slowest/higher-quality compression. Best avoided for debug builds.
Fast/reasonable-quality compression.
Slower/better-quality compression.

Default: ‘Production’.

Sets ATC_Options.quality.

=value
Compressor library.

Auto compressor selects which compressor to use based on the format & quality level. Use this compressor unless you require a specific one.
Arm astc-encoder 4.8 (https://github.com/ARM-software/astc-encoder/).
Google etc2comp (https://github.com/google/etc2comp).
Intel ISPC Texture Compressor (https://github.com/GameTechDev/ISPCTextureCompressor).
NVTT (https://github.com/castano/nvidia-texture-tools).
PVRTC compressor. Available on macOS only. PVRTC support in Metal is now deprecated. Usage of ASTC/ETC2/BC formats is recommended instead.
STB DXT compressor (https://github.com/nothings/stb).

Default: ‘Auto’.

Sets ATC_Options.compressor.

Crop images with uniform content.

Sets ATC_Options.cropUniformContent.

Force DX10 extended header for DDS files.

Formats the legacy DDS header cannot represent faithfully, such as the sRGB ones, are always written with the DX10 header. This option forces the DX10 header for the other formats too.

=value
Decompressed file path.
=value
Decompression format.

Default: ‘Auto’.

=value
Decompressor library.

With --metrics or --decompressed and an uncompressed --compression_format, an explicit decompressor refuses the format and the compress fails; Auto (which selects the RAW decompressor) copies it. Decompress and Compare modes use an uncompressed input unchanged and ignore this option for it.

Auto decompressor selects which decompressor to use based on the format. Use this decompressor unless you require a specific one.
Arm astc-encoder 3.7 (https://github.com/ARM-software/astc-encoder/).
GPU texture-sampling based decompressor, using Metal on macOS & D3D11 on Windows.
NVTT (https://github.com/castano/nvidia-texture-tools).
PVRTC compressor. Available on macOS only. PVRTC support in Metal is now deprecated. Usage of ASTC/ETC2/BC formats is recommended instead.

Default: ‘Auto’.

Disable KTX file annotation.

Sets ATC_Options.disableAnnotation.

Disable multithreading.

Sets ATC_Options.disableMultithreading.

=value
Per-axis supersample count for --equirect_to_cubemap (1 = plain bilinear).

Default: ‘4’.

Resample a single equirectangular (lat-long) input image into a cubemap. Faces are emitted in +X/-X/+Y/-Y/+Z/-Z order. Can not be combined with --build_array, --build_cubemap, --build_volume or --build_mips.
=value
Cubemap face size for --equirect_to_cubemap. 0 selects nextPow2(equirectWidth/4).

Default: ‘0’.

=value
File format.

Auto-select the file format based on the filename extension.
DDS file format.
OpenEXR file format.
C/C++ Header
KTX file format.
KTX2 file format.

Default: ‘Auto’.

Sets ATC_Options.fileFormat.

Flip image along x-axis.

Sets ATC_Options.flipX.

Flip image along y-axis.

Sets ATC_Options.flipY.

Flip image along z-axis.

Sets ATC_Options.flipZ.

=value
Format.

The target pixel format when --compression_format is not set, for example in Convert mode. Without it, Convert keeps the input's format: a 16-bit PNG converts to RGBA16, an 8-bit one to RGBA8, and an A8 DDS stays A8, which KTX and KTX2 cannot store, so converting it to either fails; pass --format=R8 to write it as R8. Decompress ignores this option and writes the decoded format, so an A8 DDS decompresses only to DDS; convert it with --format=R8 to get a KTX or KTX2 file. Accepts the uncompressed formats listed in COMPRESSION FORMATS.

Default: ‘None’.

Sets ATC_Options.format.

=value
Gamma for input image, "sRGB" or float value.

Default: ‘1.0’.

Sets ATC_Options.gammaIn, ATC_Options.isGammaInSrgb.

=value
Gamma for output texture, "sRGB" or float value.

Default: ‘1.0’.

Sets ATC_Options.gammaOut, ATC_Options.isGammaOutSrgb.

=value
Color gamut of input texture.

Display P3.
sRGB.

Sets ATC_Options.colorGamutIn, ATC_Options.colorGamutOut.

=value
Color gamut for output texture.

Display P3.
sRGB.

Sets ATC_Options.colorGamutOut.

Print detailed usage.
Print detailed usage.
=value
Maximum image extent.

Default: ‘16384’.

Sets ATC_Options.maxExtent.

=value
Maximum number of mipmaps. If set to 0 uses the number of mipmaps in the input texture. Also bounds the levels --mode=compare and --metrics measure.

When comparing, only the levels both images hold are scored, and 0 scores all of them. With a value above 1, including the default, two mip chains of different lengths are compared over that many levels if both hold them; otherwise the compare fails with ‘NumMipmaps Differ’. Use 0 or 1 to compare a single-level image with a mipped one.

Default: ‘15’.

Sets ATC_Options.maxMipmaps.

Report error metrics.

The metrics are the fields of ATC_ErrorMetrics in AppleTextureConverter(3): Error metrics returned by ATC_Compare functions. Note: for LDR sources MSE/RMS/PSNR are reported on the [0,255] scale. For HDR sources (half-float / F32) the reference scale is the per-image absolute peak, and for RGBM encoding it is options.rgbmRange — so PSNR is content-dependent for those inputs.

SSIM, MS-SSIM, Flip and the angular-error fields are populated only when options.advancedMetrics is set (they are expensive — roughly 10x the MSE/RMS/PSNR cost; see the CLI --advanced_metrics flag); otherwise they are NaN. MS-SSIM is additionally NaN for non-LDR or <11px inputs, and the angular fields are NaN unless options.isNormalMap and the comparison has >= 3 channels.

=value
Filter for mipmap generation.

Box filter.
Catmull-Rom bicubic filter (Mitchell B=0, C=0.5).
Gaussian filter. Smooth, no ringing.
Kaiser filter.
Lanczos 3-lobe windowed sinc. Sharp, prone to ringing.
Lanczos 5-lobe windowed sinc. Sharper, more prone to ringing.
Same as Triangle.
Mitchell-Netravali bicubic filter.
Triangle (linear) filter.

Default: ‘Kaiser’.

Sets ATC_Options.mipmapFilter.

=value
Operation mode.
Compress input to --compression_format and write it to --output.
Decompress a compressed input and write it to --decompressed, or to --output when --decompressed is not given. An uncompressed input is rewritten unchanged, so its format must fit the output file format: an A8 DDS decompresses to DDS, not KTX or KTX2.
Compare input with the file named by --compare, decompressing either one first if it is compressed, and print the error metrics.
Print the size, mip-level count, format and color space of input.
Copy an uncompressed input to another uncompressed pixel format (--format) or file format without compressing it. A compressed input is rewritten to the output file format without recompressing. This mode also builds textures from several inputs (--build_array, --build_cubemap, --build_volume, --build_mips) and cubemaps from an equirectangular image (--equirect_to_cubemap).

Default: ‘Compress’.

Treat image as a tangent-space normal map: store X/Y in the channels each format encodes best (ASTC rrrg, BC3 DXT5n, BC5/EAC_RG11 RG) and reconstruct Z on decompress. BC5 is recommended.

Sets ATC_Options.isNormalMap.

=value
Output file path.

Required in Compress and Convert modes.

Display progress bar.
=value
PVRTC punch through mode.

Punch-through is allowed.
Punch-through is forced-on.
Punch-through is forced-off.

Default: ‘Unused’.

Sets ATC_Options.pvrtcPunchThroughMode.

=value
Resize filter.

Box filter.
Catmull-Rom bicubic filter (Mitchell B=0, C=0.5).
Gaussian filter. Smooth, no ringing.
Kaiser filter.
Lanczos 3-lobe windowed sinc. Sharp, prone to ringing.
Lanczos 5-lobe windowed sinc. Sharper, more prone to ringing.
Same as Triangle.
Mitchell-Netravali bicubic filter.
Triangle (linear) filter.

Default: ‘Mitchell’.

Sets ATC_Options.resizeFilter.

=value
Resize round mode.

Resize to nearest multiple of four.
Resize to nearest power of two.
Resize to next (higher) multiple of four.
Resize to next (higher) power of two.
Don't round.
Resize to previous (lower) multiple of four.
Resize to previous (lower) power of two.

Default: ‘None’.

Sets ATC_Options.resizeRoundMode.

Use RGBM encoding (RGB scaled by a factor M stored in the 4th channel; the compression format must store at least 4 bits of alpha, e.g. ASTC, BC2, BC3, BC7, RGBA16). Can not be combined with --normal_map.

Sets ATC_Options.useRgbmEncoding.

=value
Range for RGBM encoding.

Default: ‘6.0’.

Sets ATC_Options.rgbmRange.

Scale image to entire color range.

Sets ATC_Options.scaleRange.

Use sRGB pixel format.

Sets ATC_Options.useSrgbFormat.

Output processing time in milliseconds.
Verbose output.
Print version.
=value
Wrap mode.

Clamp to edge.
Mirror.
Repeat.

Default: ‘Mirror’.

Sets ATC_Options.wrapMode.

Compressed formats store fixed-size blocks of texels that the GPU decodes when it samples them.

BC
Block compression, also known as DXTC, in 4x4 texel blocks. BC1 and BC4 take 8 bytes per block; BC2, BC3, BC5, BC6H and BC7 take 16. BC4 and BC5 store one and two channels, BC6H stores HDR RGB, and the others store LDR RGB or RGBA.
ASTC
16 bytes per block at every block size from 4x4 to 12x12. Smaller blocks give higher quality at a lower compression rate. HDR variants are supported on A13 and later GPUs.
ETC2 and EAC
4x4 texel blocks. ETC2 RGB, ETC2 RGB with 1-bit alpha and single-channel EAC take 8 bytes per block; two-channel EAC and EAC RGBA take 16.
PVRTC
2 or 4 bits per pixel. PVRTC support in Metal is deprecated; use ASTC, ETC2 or BC formats instead.

For tangent-space normal maps, use normal-map mode with BC5.

The formats each compressor accepts in this build of TextureConverter are:

, ASTC10x10_HDR, ASTC10x5, ASTC10x5_HDR, ASTC10x6, ASTC10x6_HDR, ASTC10x8, ASTC10x8_HDR, ASTC12x10, ASTC12x10_HDR, ASTC12x12, ASTC12x12_HDR, ASTC4x4, ASTC4x4_HDR, ASTC5x4, ASTC5x4_HDR, ASTC5x5, ASTC5x5_HDR, ASTC6x5, ASTC6x5_HDR, ASTC6x6, ASTC6x6_HDR, ASTC8x5, ASTC8x5_HDR, ASTC8x6, ASTC8x6_HDR, ASTC8x8, ASTC8x8_HDR.
, EAC_RG11, EAC_RGBA8, ETC2_RGB8, ETC2_RGB8A1.
, ASTC5x4, ASTC5x5, ASTC6x5, ASTC6x6, ASTC8x5, ASTC8x6, ASTC8x8, BC1, BC3, BC4, BC5, BC6U, BC7, ETC2_RGB8.
, BC2, BC3, BC4, BC5, BC6S, BC6U, BC7, EAC_R11, EAC_RGBA8, ETC2_RGB8.
, PVRTC_RGBA_4BPP, PVRTC_RGB_2BPP, PVRTC_RGB_4BPP. PVRTC support in Metal is now deprecated. Usage of ASTC/ETC2/BC formats is recommended instead.
, BC3, BC4, BC5.

With --compressor=Auto, TextureConverter selects a compressor from the compression format, the quality level and --normal_map, and reports its choice.

Uncompressed formats: A8, ABGR4, B5G6R5, BGR10A2, BGR5A1, BGRA8, BGRX8, R16, R32, R8, RG16, RG32, RG8, RGB10A2, RGB16, RGB32, RGB8, RGBA16, RGBA32, RGBA8.

Format names list the components from the lowest byte, or for the 16-bit packed formats the lowest bits, up, as Metal names its pixel formats. B5G6R5, BGR5A1 and ABGR4 hold the layouts of MTLPixelFormatB5G6R5Unorm (B in bits 4:0, G in 10:5, R in 15:11), MTLPixelFormatBGR5A1Unorm (B in 4:0, G in 9:5, R in 14:10, A in bit 15) and MTLPixelFormatABGR4Unorm (A in 3:0, B in 7:4, G in 11:8, R in 15:12). Vulkan and Direct3D 9 name packed formats from the high bits down, so the same layouts are VK_FORMAT_R5G6B5_UNORM_PACK16, VK_FORMAT_A1R5G5B5_UNORM_PACK16 and VK_FORMAT_R4G4B4A4_UNORM_PACK16. ABGR4 was called BGRA4 before API version 5, and all three formats then stored B in the high bits. The old name now fails with a message naming ABGR4.

Input file formats: BMP, DDS, EXR, HDR, HEIC, JPG, KTX, KTX2, PNG, TGA, TIFF, WEBP.

A grayscale PNG, JPEG, TGA or PGM fills R, G and B, and a gray+alpha PNG puts its alpha in A, so RG8, BC5 or EAC_RG11 made from one holds the gray twice and drops the alpha. To keep a second channel in an RG format, save the source as RGB with that channel in G. A 16-bit PNG or PSD keeps its 16 bits. A legacy X8R8G8B8 or X8B8G8R8 DDS loads opaque, as BGRA8 or RGBA8, whatever the --alpha_mode, so Convert to DDS writes A8R8G8B8 or A8B8G8R8 with alpha 255 unless --format=BGRX8 is given.

A legacy (non-DX10) DDS in D3DFMT_A2B10G10R10 loads as RGB10A2, and one in D3DFMT_G16R16 loads as RGBA16 with B = 0 and A = 1, as there is no two-channel 16-bit unorm format to hold it. The signed bump formats (V8U8, V16U16, Q8W8V8U8, X8L8V8U8, A2W10V10U10) and any other 32-bit mask set besides A8R8G8B8, X8R8G8B8, A8B8G8R8, X8B8G8R8 and A2R10G10B10 fail with an “Unsupported DX9 ...” error, where earlier versions misread them.

The 16-bit packed formats are written and read as follows. DDS stores B5G6R5 and BGR5A1 as DXGI_FORMAT_B5G6R5_UNORM and DXGI_FORMAT_B5G5R5A1_UNORM (D3DFMT_R5G6B5 and D3DFMT_A1R5G5B5 in a legacy header), which are their layouts, so the pixels pass through. ABGR4 has no DDS format of its own and is stored as DXGI_FORMAT_B4G4R4A4_UNORM (D3DFMT_A4R4G4B4), which has no public Metal format, with the pixels repacked on write and back on read. KTX labels B5G6R5 GL_RGB with GL_UNSIGNED_SHORT_5_6_5 and ABGR4 GL_RGBA with GL_UNSIGNED_SHORT_4_4_4_4; BGR5A1 cannot be written to KTX. KTX2 labels them VK_FORMAT_R5G6B5_UNORM_PACK16, VK_FORMAT_A1R5G5B5_UNORM_PACK16 and VK_FORMAT_R4G4B4A4_UNORM_PACK16. On read, a KTX or KTX2 file in any component order of the same fields, such as GL_BGR with GL_UNSIGNED_SHORT_5_6_5, VK_FORMAT_B5G6R5_UNORM_PACK16 or VK_FORMAT_B5G5R5A1_UNORM_PACK16, loads as the format with the same components, repacked. A KTX file that gives GL_RGB565, GL_RGB5_A1 or GL_RGBA4 without a matching packed type does not say where R and B are, and fails to load.

DDS and KTX files of these formats written by earlier versions held B in the high bits under labels that say otherwise, so B5G6R5 files and BGRA4 KTX files now load with R and B swapped, and BGR5A1 and BGRA4 DDS files with their channels scrambled. KTX2 files from earlier versions were labelled VK_FORMAT_B5G6R5_UNORM_PACK16, VK_FORMAT_B5G5R5A1_UNORM_PACK16 and VK_FORMAT_B4G4R4A4_UNORM_PACK16, which matched their pixels, so they load correctly.

Output file formats: Auto, DDS, EXR, H, KTX, KTX2.

With --file_format=Auto, the output file format follows the extension of the --output path; an unrecognised extension writes KTX.

Unless --disable_annotation is given, KTX output records the TextureConverter version and the options used, which --check_details reads back. KTX and KTX2 output can also carry these keys:

ATC_KeyMtlPixelFormat
"KTXmetalPixelFormat", as defined in the KTX spec (https://registry.khronos.org/KTX/specs/2.0/ktxspec.v2.html), section 5.3.3 This describes the MTLPixelFormat for the texture data. It is only set for textures where the format can not be determined from the file header. This currently means ASTC LDR & HDR textures when saved to KTX 1.1 files.
ATC_KeyPremultipliedAlpha
"com.apple.image.premultipliedAlpha". This indicates that the texture data has pre-multiplied alpha. The value is written as a 32-bit unsigned integer with zero indicating false & non-zero indicating true.
ATC_KeyColorGamut
"com.apple.image.colorGamut". Specifies the color gamut of the image. The value is written as a 0 terminated string. When compressing, it is written only when the options give a gamut (--gamut_in, or --gamut_out on colour-space builds); it is not read from the source image. CLI decompress mode rewrites the loaded image and carries over the gamut read from the source file. Values are:
  • 'sRGB'
  • 'DisplayP3'
  • when carried over from a source file: 'DCIP3', 'BT709', 'BT2020', 'BT2100', 'Adobe-RGB-1998', 'CIE-1931-XYZ' or 'ACEScg'

KTX2 records the gamut in the DFD colorPrimaries field instead, and writes this key (with ATC_KeyColorTransfer where that has a value) only when the DFD cannot record the transfer function (see below). A texture with no known gamut, including every normal map, omits this key in KTX 1.1. In KTX2, normal maps and textures given atcColorGamutNone are written with KHR_DF_PRIMARIES_UNSPECIFIED, and colour textures with no gamut given keep libktx's default BT709 primaries. Reading a KTX2 whose DFD primaries and transfer give no TextureConverter color space (e.g. ACES AP0, BT.601, or Adobe RGB with a linear transfer) prints a warning, unless the options give a gamut: a conversion does not preserve them.

ATC_KeyColorTransfer
"com.apple.image.colorTransfer". Specifies the color transfer function of the image. The value is written as a 0 terminated string. Values are:
  • 'sRGB'
  • 'linear'
  • 'PQ'
  • 'HLG'
  • 'ITU'

Omitted where the gamut implies the transfer function ('DCIP3', 'Adobe-RGB-1998', 'CIE-1931-XYZ'). KTX2 records the transfer function in the DFD transferFunction field, which may only be linear or sRGB. TextureConverter writes sRGB there for an _SRGB format, or for sRGB data in a float format, and linear otherwise. When that does not describe the data (sRGB data in any other format, PQ, HLG, ITU, and the implied transfer functions of 'DCIP3' and 'Adobe-RGB-1998'), a KTX2 also carries ATC_KeyColorGamut and, where it has a value, this key. The pair only adds what the DFD cannot state: it always agrees with the DFD's primaries and transfer. When reading a KTX2, TextureConverter uses the pair only where it agrees with the DFD, and otherwise ignores it with a warning.

ATC_KeyNormalMap
"com.apple.image.normalMap". Indicates that the texture contains a normal map (tangent-space XYZ normals). The value is written as a 32-bit unsigned integer with zero indicating false & non-zero indicating true. Written for both KTX and KTX2 files.

TextureConverter exits 0 on success, including for --h, --help and --version, and 255 on failure. In Compare mode it exits 0 only when the two images are identical. In the texturetool compatibility interface, -h, -? and -l also exit 0; an unknown or ambiguous option, a missing option argument or an unsupported -e encoder exits 255.

To compress a source file to ASTC4x4 at highest quality with mip-maps:

TextureConverter --compression_format=ASTC4x4 --compression_quality=Highest --output=Output.ktx2 Input.png

To compress a source file to BC1 at highest quality with no mip-maps:

TextureConverter --max_mipmaps=1 --compression_format=BC1 --compression_quality=Highest --output=Output.ktx2 Input.png

To build a cube map from multiple source files:

TextureConverter --mode=convert --build_cubemap --output=Cubemap.ktx2 X_Pos.png X_Neg.png Y_Pos.png Y_Neg.png Z_Pos.png Z_Neg.png

To build a volume texture from multiple source files and compress to BC1:

TextureConverter --compression_format=BC1 --build_volume --output=Volume.ktx2 Slice1.png Slice2.png Slice3.png Slice4.png

To decompress a source file:

TextureConverter --mode=decompress --output=Output.ktx2 Input.ktx2

To compare two images:

TextureConverter --mode=compare --compare=Input2.ktx2 Input1.ktx2

When the first argument does not begin with two dashes, TextureConverter parses the command line as the legacy texturetool interface:

Usage: TextureConverter [-hl]
       TextureConverter [-m] [-e <encoder>] -o <output> [-f <format>] <input_image>

       first form:
         -h       Display this help menu.
         -l       List available encoders, individual encoder options, and file formats.

       second form:
         -m       Generate a complete mipmap chain from the input image.
         -e       Encode texture levels with <encoder>.
         -o       Write processed image to <output>.
         -f       Set file <format> for <output> image.

AppleTextureConverter(3)

October 19, 2026 macOS 26