# What is a DDS File?

A DDS file is a DirectDraw Surface container for texture data used by graphics systems. It can hold mipmaps, cube maps, volume textures, and compressed pixel formats suitable for direct GPU use.

<span aria-hidden="true" id="how-it-works"></span>

## How DDS Files work

DDS stores GPU texture data behind a four-byte signature and a fixed header that records dimensions, pixel format, mipmap count, and surface capabilities. Beyond a single 2D image it can describe mipmap chains, cube-map faces, volume textures, and, with the DirectX 10 header extension, texture arrays. The pixel payload is either uncompressed or block-compressed (DXT1 to DXT5, later named BC1 to BC3, plus BC4 to BC7), a form that graphics hardware decodes directly. Because the format grew by extension, files differ in which header fields and format codes they use, and tool support varies by variant.

<span aria-hidden="true" id="key-facts"></span>

## Key facts

1. A DDS starts with the magic value `DDS ` (0x20534444) and a 124-byte `DDS_HEADER`, so a reader should require at least 128 bytes and check that the header’s `dwSize` is 124 and its embedded `DDS_PIXELFORMAT` size is 32. When the pixel format sets `DDPF_FOURCC` with the FourCC `DX10`, a `DDS_HEADER_DXT10` follows and the minimum becomes 148 bytes. These minimums cover the headers only, not the pixel data. That extension is needed for texture arrays and for DXGI formats the legacy pixel-format structure cannot express, and Microsoft notes that not all DDS tools support it.
2. On Direct3D, which block-compressed formats a device accepts depends on its feature level, not on the container: Microsoft lists BC1 to BC3 (the former DXT1 to DXT5) as required at every feature level, BC4 and BC5 from Direct3D 10, and BC6H and BC7 only from Direct3D 11. For the widest tool compatibility, Microsoft recommends the legacy pixel-format header for uncompressed RGB and DXT1 to DXT5 data.
3. Block-compressed mip levels are stored as whole 4×4 blocks. A level smaller than 4×4 texels is still padded to a full block (8 bytes for BC1 and BC4, 16 bytes for the other BC formats), so level sizes must be computed in blocks rather than pixels; Microsoft’s row formula, evaluated with integer division, is `max(1, (width + 3) / 4) * block-size`.
4. Header fields are not reliable across writers. Microsoft advises readers not to depend on the `DDSD_CAPS`, `DDSD_PIXELFORMAT`, `DDSD_MIPMAPCOUNT`, `DDSCAPS_TEXTURE`, or `DDSCAPS_COMPLEX` flags being set, and to compute pitch instead of trusting `dwPitchOrLinearSize`. Alpha is only partly described: the DX10 header has an alpha-mode field (unknown, straight, premultiplied, opaque, or custom), and a file can leave it at unknown. Among legacy files only the `DXT2` and `DXT4` FourCCs indicate premultiplied alpha; other legacy files leave it unspecified and are typically assumed to use straight alpha.

<span aria-hidden="true" id="when-it-matters"></span>

## When DDS Files matter

Use DDS when a rendering pipeline benefits from precomputed mipmaps or GPU-native texture compression. Verify format support on the target API and hardware, because unsupported variants require conversion or decompression.

<span aria-hidden="true" id="transloadit"></span>

## How Transloadit helps with DDS Files

Transloadit’s image format reference, which covers its ImageMagick-based image Robots such as /image/resize, lists DDS and the `DXT1` and `DXT5` variants as readable and writable.

The reference records format-level read and write support only. It does not say which DDS header variants or BC formats decode, and ImageMagick documents `dxt1`, `dxt5`, and uncompressed as its DDS write options, so test representative files before relying on DX10-header or BC7 textures.

* [Supported image formats→](/docs/supported-formats/image-formats.md)
* [/image/resize Robot→](/docs/robots/image-resize.md)

[Explore Transloadit’s file formats & compression capabilities](/docs/supported-formats.md)

<span aria-hidden="true" id="references"></span>

## Sources

* [Microsoft Learn: Programming Guide for DDS (file layout, variants, pitch calculation)](https://learn.microsoft.com/en-us/windows/win32/direct3ddds/dx-graphics-dds-pguide)
* [Microsoft Learn: DDS\_HEADER structure](https://learn.microsoft.com/en-us/windows/win32/direct3ddds/dds-header)
* [Microsoft Learn: DDS\_HEADER\_DXT10 structure](https://learn.microsoft.com/en-us/windows/win32/direct3ddds/dds-header-dxt10)
* [Microsoft Learn: Texture Block Compression in Direct3D 11 (formats and minimum feature levels)](https://learn.microsoft.com/en-us/windows/win32/direct3d11/texture-block-compression-in-direct3d-11)
* [Microsoft Learn: Block Compression (Direct3D 10), virtual size versus physical size](https://learn.microsoft.com/en-us/windows/win32/direct3d10/d3d10-graphics-programming-guide-resources-block-compression)
* [Microsoft Learn: Using Compressed Textures (Direct3D 9), DXT1 to DXT5 and premultiplied alpha](https://learn.microsoft.com/en-us/windows/win32/direct3d9/using-compressed-textures)
* [ImageMagick: Image Formats, DDS entry and dds: defines](https://imagemagick.org/formats/)
* [Pillow handbook: Image file formats, DDS (per-variant read and write support)](https://pillow.readthedocs.io/en/stable/handbook/image-file-formats.html)

[← DCT Compression](/glossary/dct-compression.md)[Deconvolution →](/glossary/deconvolution.md)

More in file formats & compression

* [AVIF](/glossary/avif.md)
* [Common Media Application Format (CMAF)](/glossary/common-media-application-format-cmaf.md)
* [DAT File](/glossary/dat-file.md)
* [DIB File](/glossary/dib-file.md)
* [DivX File](/glossary/divx-file.md)
* [ECW File](/glossary/ecw-file.md)

[All 505 terms](/glossary.md)

## Turn media knowledge into a working pipeline

Connect uploads, processing, AI, storage, and delivery through one declarative API — with the encoding stack, scaling, and format churn handled for you.

[Try Transloadit for free](/c/signup/)
