8 releases

0.5.2 Oct 28, 2023
0.5.1 Mar 9, 2022
0.5.0 Jan 19, 2022
0.4.0 Nov 17, 2019
0.2.1 Jan 21, 2018

#78 in Graphics APIs

Download history 1583/week @ 2024-01-01 1731/week @ 2024-01-08 2246/week @ 2024-01-15 2316/week @ 2024-01-22 2006/week @ 2024-01-29 1691/week @ 2024-02-05 1899/week @ 2024-02-12 2221/week @ 2024-02-19 2925/week @ 2024-02-26 2443/week @ 2024-03-04 1906/week @ 2024-03-11 2128/week @ 2024-03-18 2275/week @ 2024-03-25 2450/week @ 2024-04-01 1895/week @ 2024-04-08 2277/week @ 2024-04-15

9,249 downloads per month
Used in 38 crates (20 directly)

MIT license

87KB
2K SLoC

ddsfile

MIT licensed

ddsfile on crates.io

Documentation

This library is for parsing and composing Microsoft DirectDraw Surface (.DDS) files. Such files hold texture data, originally for DirectX, but other drawing APIs such as OpenGL and Vulkan can use the texture data. Many asset conditioning pipelines deal in this format only, so even if you are working with OpenGL or Vulkan you probably still need to handle .DDS files.

This library supports mipmapped textures, volume textures, texture arrays, cube maps, compressed texture formats (DXTn / BCn) and the DirectX 10 extension header. Both the older D3DFormat and the newer DxgiFormat are supported, as well as files with the format undefined (whenever enough data is available to do so).

This library deals primarily with the container envelope. The texture data itself is mostly opaque. However, some data is available from the headers about the texture data, including:

  • The format
  • The width, height, and depth
  • The bits per pixel, pitch and stride
  • The number of mipmap levels, if any
  • The minimum size in bytes of a mipmap level
  • The number of array layers, if any
  • RGBA bitmasks for uncompressed formats (only available for older D3DFormats currently)
  • The block size for compressed formats
  • Several flags including CUBEMAP and LUMINANCE

License

Licensed under the MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, shall be licensed under the MIT license without any additional terms or conditions.

Dependencies

~2MB
~41K SLoC