image_dds

所属分类:内容生成
开发工具:Rust
文件大小:0KB
下载次数:0
上传日期:2023-09-11 23:58:30
上 传 者sh-1993
说明:  将图像转换为压缩DDS格式或从压缩DDS格式化转换图像,
(Convert images to and from compressed DDS formats,)

文件列表:
CHANGELOG.md (1630, 2023-12-23)
Cargo.toml (67, 2023-12-23)
LICENSE (1060, 2023-12-23)
bcndecode-sys/ (0, 2023-12-23)
bcndecode-sys/Cargo.toml (292, 2023-12-23)
bcndecode-sys/build.rs (278, 2023-12-23)
bcndecode-sys/src/ (0, 2023-12-23)
bcndecode-sys/src/bcdec.c (70944, 2023-12-23)
bcndecode-sys/src/lib.rs (1198, 2023-12-23)
image_dds/ (0, 2023-12-23)
image_dds/Cargo.toml (1219, 2023-12-23)
image_dds/benches/ (0, 2023-12-23)
image_dds/benches/dds_from_image.rs (631, 2023-12-23)
image_dds/benches/image_from_dds.rs (669, 2023-12-23)
image_dds/benches/imagef32_from_dds.rs (678, 2023-12-23)
image_dds/examples/ (0, 2023-12-23)
image_dds/examples/dds2img.rs (462, 2023-12-23)
image_dds/examples/dds2imgf32.rs (465, 2023-12-23)
image_dds/examples/img2dds.rs (1688, 2023-12-23)
image_dds/examples/img2ddsf32.rs (1621, 2023-12-23)
image_dds/fuzz/ (0, 2023-12-23)
image_dds/fuzz/Cargo.toml (818, 2023-12-23)
image_dds/fuzz/fuzz_targets/ (0, 2023-12-23)
image_dds/fuzz/fuzz_targets/decode_surface_rgba8.rs (146, 2023-12-23)
image_dds/fuzz/fuzz_targets/decode_surface_rgba8_single_block.rs (459, 2023-12-23)
image_dds/fuzz/fuzz_targets/decode_surface_rgbaf32.rs (148, 2023-12-23)
image_dds/fuzz/fuzz_targets/encode_surface_rgba8.rs (326, 2023-12-23)
image_dds/src/ (0, 2023-12-23)
image_dds/src/bcn.rs (511, 2023-12-23)
image_dds/src/bcn/ (0, 2023-12-23)
image_dds/src/bcn/decode.rs (11378, 2023-12-23)
image_dds/src/bcn/encode.rs (9237, 2023-12-23)
image_dds/src/dds.rs (11036, 2023-12-23)
image_dds/src/decode.rs (10267, 2023-12-23)
... ...

# image_dds [![Latest Version](https://img.shields.io/crates/v/image_dds.svg)](https://crates.io/crates/image_dds) [![docs.rs](https://docs.rs/image_dds/badge.svg)](https://docs.rs/image_dds) A library for converting uncompressed image data to and from compressed formats. ## Examples The provided example projects demonstrate basic usage of the conversion functions. The library also provides functions for working directly with the raw bytes of a surface instead of a dds or image file. Floating point data like EXR files or BC6 DDS files is also supported. `cargo run --release --example img2dds image.png out.dds BC3Unorm` `cargo run --release --example dds2img out.dds out.tiff` `cargo run --release --example img2ddsf32 image.exr out.dds` `cargo run --release --example dds2imgf32 out.dds out.exr` Array layers and depth slices in images should be stacked vertically. This enables surface creation to avoid making additional copies since the RGBA data is already in the desired layout. `cargo run --release --example img2dds 3d.dds 3d.png` `cargo run --release --example img2dds 3d.png out.dds R8G8B8A8Unorm depth` `cargo run --release --example dds2imgf32 cube.dds cube.exr` `cargo run --release --example img2ddsf32 cube.exr out.dds layers` ## Supported Formats The only compressed formats supported at this time are BCN formats since these are the formats commonly used by DDS files and compressed GPU textures. This library does not support other compressed formats used for GPU textures like ETC1. Compression is handled using [intel-tex-rs-2](https://github.com/Traverse-Research/intel-tex-rs-2) for bindings to Intel's ISPC texture compressor in C++. Decompression is handled using bindings to the [bcdec](https://github.com/iOrange/bcdec) library in C. | Format | Encode | Decode | | --- | --- | --- | | BC1 | | | | BC2 | | | | BC3 | | | | BC4 | | | | BC5 | | | | BC6 | | | | BC7 | | | Some uncompressed formats are also supported. These formats are supported by DDS but are rarely used with DDS files in practice. Uncompressed formats are often used for small textures or textures used for window surfaces and UI elements. | Format | Encode | Decode | | --- | --- | --- | | R8 | | | | R8G8B8A8 | | | | B8G8R8A8 | | | | R16G16B16A16Float | | | | R32G32B32A32Float | | | ## Features Helper functions for working with the files from the [image](https://crates.io/crates/image) and [ddsfile](https://crates.io/crates/ddsfile) crates are supported under feature flags and enabled by default. The `decoding` and `encoding` features are enabled by default. Disabling the `encoding` feature may resolve compilation issues on certain targets if not needed. ## Building Build the projects using `cargo build --release` with a newer version of the Rust toolchain installed. Builds support Windows, Linux, and MacOS. Some targets may not build properly due to a lack of precompiled ISP kernels in intel-tex-rs-2.

近期下载者

相关文件


收藏者