mirror of
https://github.com/microsoft/DirectXTex
synced 2024-12-12 13:10:10 +00:00
Updated Texdiag (markdown)
parent
ef3f9901f2
commit
02f450e0e2
50
Texdiag.md
50
Texdiag.md
@ -8,17 +8,14 @@ DirectXTex sample is a command-line utility analyzing the content of images.
|
||||
``Texdiag.exe`` uses the following command syntax:
|
||||
|
||||
```
|
||||
texdiag <command> [-r]
|
||||
[-if filter] [-tu | -tf] [-dword] [-badtails] [-xlum]
|
||||
[-f format] [-o filename] [-l] [-y] [-c diffcolor] [-t <float>]
|
||||
[-targetx <num>] [-targety <num>]
|
||||
[-nologo] [-flist <filename>]
|
||||
[-ft <filetype>]
|
||||
<file-name(s)>
|
||||
texdiag <command> [options] [-flist <filename>] <file-name(s)>
|
||||
```
|
||||
|
||||
The file-name parameter indicates the file(s) to diagnose using ``dds``, ``tga``, ``hdr``, or a WIC-supported format (``bmp``, ``jpg``, ``png``, ``jxr``, etc.).
|
||||
|
||||
> The command-line parsing uses Windows-style `-` or `/` for options. It also has some POSIX-like behavior: it supports ``--version`` and ``--help`` command-line options, and the use of ``--`` disables further options parsing to support filenames that begin with `-` or `/` characters.
|
||||
|
||||
|
||||
# Commands
|
||||
|
||||
**info**: Outputs image metadata information such as width, height, format, etc.
|
||||
@ -33,11 +30,29 @@ The file-name parameter indicates the file(s) to diagnose using ``dds``, ``tga``
|
||||
|
||||
**dumpdds**: Writes out each individual frame of a complex DDS file.
|
||||
|
||||
|
||||
# Optional Switches Description
|
||||
|
||||
## File options
|
||||
|
||||
**-r**: Input file names can contain wildcard characters (``?`` or ``*``). If this switch is used, subdirectories are also searched.
|
||||
|
||||
**-flist _filename_**: Uses the provided filename as a text file containing a list of input files (one per line). Ignores lines that begin with ``#`` (used for comments). Does not support providing additional command-line arguments or the use of filename wildcards.
|
||||
|
||||
**-o** _filename_: Provides the output filename and file type for a ``diff`` command. Defaults to the same as the first input image as a ``bmp``.
|
||||
|
||||
**-l**: Forces the output path & filename to all lower-case. *Windows file system is case-insensitive by default, but some programs like git are case-sensitive*.
|
||||
|
||||
**-y**: overwrite existing output file (if any) for ``diff`` command.
|
||||
|
||||
|
||||
## Filtering options
|
||||
|
||||
**-if _filter_**: Image filter used for loading WIC-based images required for some formats. Use one of the following: ``POINT``, ``LINEAR``, ``CUBIC``, ``FANT``, ``BOX``, ``TRIANGLE``, ``POINT_DITHER``, ``LINEAR_DITHER``, ``CUBIC_DITHER``, ``FANT_DITHER``, ``BOX_DITHER``, ``TRIANGLE_DITHER``, ``POINT_DITHER_DIFFUSION``, ``LINEAR_DITHER_DIFFUSION``, ``CUBIC_DITHER_DIFFUSION``, ``FANT_DITHER_DIFFUSION``, ``BOX_DITHER_DIFFUSION``, or ``TRIANGLE_DITHER_DIFFUSION``. Filters with ``DITHER`` in their name indicate that the 4x4 ordered dither algorithm, while ``DITHER_DIFFUSION`` is error diffusion dithering.
|
||||
|
||||
|
||||
## DirectDraw Surface (DDS) file options
|
||||
|
||||
**-tu**: DDS files with TYPELESS formats are treated as UNORM
|
||||
**-tf**: DDS files with TYPELESS formats are treated as FLOAT
|
||||
|
||||
@ -49,23 +64,22 @@ The file-name parameter indicates the file(s) to diagnose using ``dds``, ``tga``
|
||||
|
||||
**-xlum**: DDS files with L8, A8L8, or L16 formats are expanded to 8:8:8:8 or 16:16:16:16. Without this flag, they are converted to 1-channel (red) or 2-channel (red/green) formats.
|
||||
|
||||
|
||||
## DIFF options
|
||||
|
||||
**-f** _format_: Provides the desired output format for a ``diff`` command. Defaults to BRGA32.
|
||||
|
||||
**-o** _filename_: Provides the output filename and file type for a ``diff`` command. Defaults to the same as the first input image as a ``bmp``.
|
||||
|
||||
**-l**: Forces the output path & filename to all lower-case. *Windows file system is case-insensitive by default, but some programs like git are case-sensitive*.
|
||||
|
||||
**-y**: overwrite existing output file (if any) for ``diff`` command.
|
||||
|
||||
**-c _color_**: Provide a 'highlight color' to use for the ``diff`` command. By default, no highlight is used. For example, use ``-c 00FF00`` for a green highlight where the absolute difference exceeds a threshold.
|
||||
|
||||
**-t _float_**: Provides the threshold value in 0..1 for the ``diff`` command to control color highlighting (``-c``). Defaults to 0.25.
|
||||
|
||||
|
||||
## DUMPBC options
|
||||
|
||||
**-targetx** _num_, **-targety** _num_: Provides a target pixel location for the ``dumpbc`` command. For ``DDS`` files with mipmap chains it will match the block that maps to the pixel location in subsequently lower mip-levels. By default ``dumpbc`` dumps out all blocks.
|
||||
|
||||
**-nologo**: Suppress copyright message.
|
||||
|
||||
**-flist _filename_**: Uses the provided filename as a text file containing a list of input files (one per line). Ignores lines that begin with ``#`` (used for comments). Does not support providing additional command-line arguments or the use of filename wildcards.
|
||||
## DUMPDDS options
|
||||
|
||||
**-ft _file-type_**: (``dumpdds`` command only) A file type for the output texture. Use one of the following. The default value is ``bmp``.
|
||||
* ``bmp``: Windows BMP
|
||||
@ -76,6 +90,12 @@ The file-name parameter indicates the file(s) to diagnose using ``dds``, ``tga``
|
||||
* ``tif``, ``tiff``: Tagged Image File Format
|
||||
* ``jxr``: Windows Media Photo
|
||||
|
||||
|
||||
## Miscellaneous options
|
||||
|
||||
**-nologo**: Suppress copyright message.
|
||||
|
||||
|
||||
# Examples
|
||||
|
||||
The basic use for this tool is just printing out the metadata for the image:
|
||||
|
Loading…
Reference in New Issue
Block a user