-
Notifications
You must be signed in to change notification settings - Fork 452
Image formats
The DirectXTex library primarily uses Windows Imaging Component (aka WIC) to perform image I/O, but includes a custom codec for DDS
, HDR
, and TGA
files as well as optional support for EXR
. A complete, detailed description of image file formats is well beyond the scope of this wiki. This page does provide a quick overview of the comment formats the library deals with.
The BMP
file format is a long-lived Windows-specific format for images which is supported by a built-in WIC codec. See Wikipedia for more details.
To aid in debugging, here is a simple console program for dumping out the content of a BMP header in a human-readable form.
The DDS
file format is not so much an image format as a "Direct3D resource" container for textures. It can contain data in all DXGI formats, 1D textures, 2D textures, 1D & 2D texture arrays, cubemaps, cubemap arrays, and volume maps. For more details, see The DDS File Format Lives and DDS Programmer's Guide.
Windows 8.x and Windows 10 include a built-in WIC codec which supports
DDS
files in DXTn (aka BC1-BC3) format. No other formats are supported.
To aid in debugging, here is a simple console program for dumping out the content of a DDS header in a human-readable form. It requires the dds.h
header in the DirectXTex library to build.
The EXR
file format is a high dynamic-range (HDR) image file format developed by Industrial Light & Magic for use in computer imaging applications. This format is implemented by the OpenEXR library.
Use of
EXR
requires the OpenEXR library and additional code. See Adding OpenEXR for more details.
Kainz, Bogart, and Hess. "Chapter 26. The OpenEXR Image File Format", GPU Gems, Addison-Wesley, 2004 link
The GIF
file format is a Web meme standard that can contain multiple 'frames' of animation, but is otherwise limited to 256 colors. It is supported by a built-in WIC codec. See Wikipedia for more details and history.
The WDP
file format (aka JPEG-XR) is a High-Dynamic Range (HDR) image file format. It is supported by a built-in WIC codec. See the HD Photo Specification and Wikipedia for more details.
Note that the Xbox One XDK version of WIC does not include the HD Photo codec.
The HDR
file format is a High-Dynamic Range (HDR) image file format, and is commonly used as a source for textures. See Wikipedia for more details.
Greg Ward, "Real Pixels", Graphics Gems II, James Arvo (editor), Academic Press, 1991, ISBN: 0120644819, p. 80-83 (code)
To aid in debugging, here is a simple console program for dumping out the content of a HDR header.
The JPG
or JPEG
file format is a lossy compressed image file format commonly used for photos. See Independent JPEG Group and Wikipedia for more details.
The PNG
file format is a commonly used lossless compressed image file format, which has largely taken over for GIF
in use for general web graphics. See libpng and Wikipedia for more details and history.
The TIF
or TIFF
file format is kind of meta-container that is often used for image files used in various compressed formats, as well as other application. The image uses of this file format are supported by a built-in WIC codec. See Wikipedia for more details.
The TGA
file format is one of the earliest and simplest file formats for 24-bits-per-pixel images, and is commonly used as a source file for textures. See Wikipedia and this text file for more details.
To aid in debugging, here is a simple console program for dumping out the content of a TGA header in a human-readable form.
All content and source code for this package are subject to the terms of the MIT License.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.
- Universal Windows Platform apps
- Windows desktop apps
- Windows 11
- Windows 10
- Windows 8.1
- Xbox One
- Xbox Series X|S
- Windows Subsystem for Linux
- x86
- x64
- ARM64
- Visual Studio 2022
- Visual Studio 2019 (16.11)
- clang/LLVM v12 - v18
- GCC 10.5, 11.4, 12.3
- MinGW 12.2, 13.2
- CMake 3.20
DirectX Tool Kit for DirectX 11