1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! TIFF decoding and encoding with zenpixels integration.
//!
//! Wraps the [`tiff`] crate, providing a pixel-buffer-oriented API that
//! integrates with the zen* codec ecosystem.
//!
//! # Quick start
//!
//! ```no_run
//! use zentiff::{decode, probe, encode, TiffDecodeConfig, TiffEncodeConfig};
//! use enough::Unstoppable;
//!
//! // Decode
//! let data: &[u8] = &[]; // your TIFF bytes
//! let output = decode(data, &TiffDecodeConfig::default(), &Unstoppable)?;
//! println!("{}x{}", output.info.width, output.info.height);
//!
//! // Encode
//! let encoded = encode(&output.pixels.as_slice(), &TiffEncodeConfig::default(), &Unstoppable)?;
//! # Ok::<(), whereat::At<zentiff::TiffError>>(())
//! ```
//!
//! # Supported formats
//!
//! ## Decode
//!
//! All color types and sample depths supported by the `tiff` crate:
//! - Gray, GrayAlpha, RGB, RGBA in u8/u16/u32/u64/i8/i16/i32/i64/f16/f32/f64
//! - Palette (expanded to RGB8)
//! - CMYK/CMYKA (converted to RGBA)
//! - YCbCr, Lab (decoded as RGB)
//!
//! ## Encode
//!
//! - Gray, RGB, RGBA in u8/u16/f32
//! - GrayAlpha (expanded to RGBA for encoding)
//! - LZW, Deflate, PackBits, or uncompressed
//! - Horizontal prediction for improved compression
//! - Standard and BigTIFF formats
extern crate alloc;
extern crate std;
// Crate info for whereat error tracing
define_at_crate_info!;
//#[cfg(feature = "zennode")]
//pub mod zennode_defs;
pub use ;
pub use ;
pub use TiffError;
/// Result type alias for zentiff operations.
pub type Result<T> = Result;