Texture Conversion Tool (texconv.exe)

A command line tool that converts textures between the following formats: bmp, dds, jpg, hdr, pfm or png.

Compatibility Chart

Direct3D 9 Direct3D 9 EX Direct3D 10 64-bit Native Mode Windows XP Windows Vista

Yes

No

No

Yes

Yes

Yes

Path

Executable: (SDK root)\Utilities\Bin\x86 or x64

Syntax

The command-line usage is:

texconv [-w num] [-h num] [-d num] [-m num] [-f format] [-if filter] [-mf filter] [-c color]
[-srgbi] [-srgbo] [-px str] [-sx str] [-o dir] [-ft filetype] [-nologo] Filename

The assembler switch options are:

Optional Switch Options Description
-c color Colorkey value. Wherever this color appears in the source texture it is replaced with a transparent black value (0x000000) in the output texture. If an alpha channel is present in the output texture, this will make the specified color transparent. If no alpha channel is present it will be changed to black. When specifying this color, always include an alpha value (use FF if the color is opaque). For example, -c FFFE02A5 will set the colorkey value to a solid magenta.
-d num Depth of the output texture. This setting applies only to volume textures.
-f format Output Format. Use any of the formats in D3DFORMAT without the D3DFMT_ prefix (except: D3DFMT_MULTI2_ARGB8).
-ft filetype A file type for the output texture. Use one of: bmp, dds, jpg, hdr, pfm or png. The default value is dds.
-h num Height of the output texture in pixels.
-w num Width of the output texture in pixels.
-if filter Image filter. Use one of the following: NONE, POINT, LINEAR, TRIANGLE, BOX, NONE_DITHER, POINT_DITHER, LINEAR_DITHER, TRIANGLE_DITHER and BOX_DITHER. Filters with dither in the name indicate that a 4x4 ordered dither algorithm is also applied. See D3DX_FILTER for descriptions of the filters.
-m num Number of mipmap levels to generate in the output texture. This setting only applies to dds output. For more information, see Texture Filtering with Mipmaps.
-mf filter Mip filter value described in D3DX_FILTER.
-o dir Output directory.
-px str Text string to attach to the front of the resulting texture's name.
-srgbi or -srgbo Use -sRGBi to indicate that the input data is in the sRGB (gamma 2.2) color format. Use -sRGBo to indicate that the output data should be in sRGB color format.
-sx str Text string to attach to the end of the resulting texture's name.
-nologo Suppress copyright message.

The filename parameter indicates the file to convert.