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.

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.

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.

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.

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.

Explore Transloadit’s file formats & compression capabilities

Sources

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