2 unstable releases
Uses old Rust 2015
0.2.0 | Aug 6, 2017 |
---|---|
0.1.0 | Jul 24, 2017 |
#4 in #dxt
1MB
3.5K
SLoC
Decoder for DXTn-compressed data
This crate provides methods to decompress DXTn-compressed image data. The decompression code was based on the original C code used in the Python Pillow Imaging package.
The following formats are currently supported:
- Bc1: 565 color, 1-bit alpha (dxt1)
- Bc2: 565 color, 4-bit alpha (dxt3)
- Bc3: 565 color, 2-endpoint 8-bit interpolated alpha (dxt5)
- Bc4: 1-channel 8-bit via 1 BC3 alpha block
- Bc5: 2-channel 8-bit via 2 BC3 alpha blocks
- Bc6: 3-channel 16-bit float
The following formats are not implemented:
- Bc7: 4-channel 8-bit
Format documentation: http://oss.sgi.com/projects/ogl-sample/registry/EXT/texture_compression_s3tc.txt
License: MIT, copyright Istvan Fehervari, Robert Nix
lib.rs
:
Decoder for DXTn-compressed data
This crate provides methods to decompress DXTn-compressed image data.
The following formats are currently supported:
- Bc1: 565 color, 1-bit alpha (dxt1)
- Bc2: 565 color, 4-bit alpha (dxt3)
- Bc3: 565 color, 2-endpoint 8-bit interpolated alpha (dxt5)
- Bc4: 1-channel 8-bit via 1 BC3 alpha block
- Bc5: 2-channel 8-bit via 2 BC3 alpha blocks
- Bc6: 3-channel 16-bit float
The following formats are not implemented:
- Bc7: 4-channel 8-bit via everything
Format documentation for BC1-BC5 http://oss.sgi.com/projects/ogl-sample/registry/EXT/texture_compression_s3tc.txt
BC6 and BC7 are described here: https://www.opengl.org/registry/specs/ARB/texture_compression_bptc.txt
The decompression code was based on the original C code used in the Python Pillow Imaging package