Click to Rate and Give Feedback
MSDN
MSDN Library
DirectX
SDK Documentation
Tools
 Texture Conversion Tool (Texconv.ex...

  Switch on low bandwidth view
Texture Conversion Tool (Texconv.exe)
Bb206243.XDK_CHM_BANNER_left(en-us,VS.85).jpgBb206243.XDK_CHM_BANNER_right(en-us,VS.85).jpg

Texture Conversion Tool (Texconv.exe)

A command line tool that converts textures between the following formats: BMP, DDS, JPEG, HDR, PFM or PNG.

Compatibility Chart

Direct3D 9Direct3D 1064-bit Native ModeWindows XPWindows Vista

Yes

No

Yes

Yes

Yes

Path

The executable file, Texconv.exe, is in the following platform-dependent locations:

32-bit
DirectX SDK root\Utilities\Bin\x86
64-bit
DirectX SDK root\Utilities\Bin\x64

Syntax

Texconv.exe uses the following command syntax:

texconv [-w number] [-h number] [-d number] [-m number] [-f format] [-if filter] [-mf filter] [-c color] [-srgbi] [-srgbo] [-px string] [-sx string] [-o directory] [-ft file-type] [-nologo] file-name

The file-name parameter indicates the file to convert.

The optional command-line switches are described in the following table.

Optional SwitchesDescription
-c colorColorkey 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 makes the specified color transparent. If no alpha channel is present it is changed to black. When specifying this color, always include an alpha value (use FF if the color is opaque). For example, -c FFFE02A5 sets the colorkey value to a solid magenta.
-d numberDepth of the output texture. This setting applies only to volume textures.
-f formatOutput format. Use any of the formats in D3DFORMAT without the D3DFMT_ prefix (except: D3DFMT_MULTI2_ARGB8).
-ft file-typeA file type for the output texture. Use one of the following: bmp, dds, jpg, hdr, pfm, png, or tga. The default value is dds.
-h numberHeight of the output texture in pixels.
-w numberWidth of the output texture in pixels.
-if filterImage filter. Use one of the following: NONE, POINT, LINEAR, TRIANGLE, BOX, NONE_DITHER, POINT_DITHER, LINEAR_DITHER, TRIANGLE_DITHER, or BOX_DITHER. Filters with DITHER in their name indicate that a 4×4 ordered dither algorithm is also applied. See D3DX_FILTER for descriptions of the filters.
-m numberNumber of mipmap levels to generate in the output texture. This setting only applies to DDS output. For more information, see Texture Filtering with Mipmaps (Direct3D 9).
-mf filterMipmap filter value described in D3DX_FILTER.
-o directoryOutput directory.
-px stringText 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 stringText string to attach to the end of the resulting texture's name.
-nologoSuppress copyright message.
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker