mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-29 17:55:45 +01:00
Conflicts: crates/exr/src/decode.rs crates/exr/src/lib.rs Conflicts in crates/exr/src/lib.rs and decode.rs (module docs only): main dropped the intra-doc links for feature-gated modules and added pub mod scanline; kept that, with this PR's write bullet in main's unlinked form and its crate::write sentence. Ran: cargo test -p craft-exr --all-features (180 passed), clippy -p craft-exr --all-targets --all-features -D warnings (clean).
69 lines
2.6 KiB
Rust
69 lines
2.6 KiB
Rust
#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]
|
|
//! OpenEXR handling shared by the Craft apps.
|
|
//!
|
|
//! This first part is the naming layer every reader needs once it has a file's channel list and
|
|
//! header attributes, whichever decoder produced them:
|
|
//!
|
|
//! - [`channels`]: OpenEXR layer and channel names (`diffuse.R`, `ViewLayer.Combined.R`), the
|
|
//! channels that make a colour picture, and the channels of a layer to show as red, green, blue
|
|
//! and alpha.
|
|
//! - [`cryptomatte`]: Cryptomatte (specification 1.2) IDs, metadata keys, manifests and rank
|
|
//! channel names.
|
|
//! - [`layer_stack`]: optional layer hierarchy and compositing metadata for editable EXR exchange.
|
|
//!
|
|
//! Those take names and attribute text and depend on no decoder. With the `decode` feature:
|
|
//!
|
|
//! - `decode`: bounded part listing, flat decoding (scan lines and tiles, every compression the
|
|
//! `exr` crate reads) and writing, on top of the `exr` crate.
|
|
//! - `deep`: deep scan lines and tiles (NONE, RLE, ZIPS) and their flattening.
|
|
//! - `seek`: any channels, display rows and reduced resolution of a file's flat parts, read from
|
|
//! a seekable source and delivered band by band (or collected into planes).
|
|
//! - `stream`: one flat scan-line part read block by block, for pictures larger than memory.
|
|
//! - `write`: write flat scan-line parts from a row callback to a seekable destination.
|
|
//! - `cryptomatte_samples`: a file's Cryptomatte layers and their per-pixel (ID, coverage) ranks.
|
|
|
|
/// Bounded RLE expansion and inverse byte prediction for EXR blocks.
|
|
pub mod scanline;
|
|
|
|
/// Scanline OpenEXR writer using a caller-supplied linearization table.
|
|
pub mod rgba8;
|
|
/// RFC 1950/1951 compression and bounded inflation for EXR chunks.
|
|
pub mod zlib;
|
|
|
|
/// Bounded reconstruction of inflated PXR24 scanline blocks.
|
|
pub mod pxr24;
|
|
|
|
/// How a channel's samples are stored.
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
|
pub enum SampleType {
|
|
F16,
|
|
F32,
|
|
U32,
|
|
}
|
|
|
|
pub mod channels;
|
|
pub mod cryptomatte;
|
|
#[cfg(feature = "decode")]
|
|
pub mod cryptomatte_samples;
|
|
#[cfg(feature = "decode")]
|
|
pub mod decode;
|
|
#[cfg(all(test, feature = "decode"))]
|
|
mod decode_tests;
|
|
#[cfg(feature = "decode")]
|
|
pub mod deep;
|
|
#[cfg(all(test, feature = "decode"))]
|
|
mod deep_tests;
|
|
#[cfg(feature = "decode")]
|
|
mod dwa_guard;
|
|
pub mod layer_stack;
|
|
#[cfg(feature = "decode")]
|
|
pub mod seek;
|
|
#[cfg(all(test, feature = "decode"))]
|
|
mod seek_tests;
|
|
#[cfg(feature = "decode")]
|
|
pub mod stream;
|
|
#[cfg(feature = "decode")]
|
|
pub mod write;
|
|
#[cfg(all(test, feature = "decode"))]
|
|
mod write_tests;
|