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
//! JPEG Decoder - Public API.
//!
//! This module provides everything needed for JPEG decoding.
//!
//! # Quick Start
//!
//! ```rust,ignore
//! use jpegli::decoder::{Decoder, DecodedImage, Result};
//!
//! fn decode_jpeg(data: &[u8]) -> Result<DecodedImage> {
//! Decoder::new().decode(data)
//! }
//! ```
//!
//! # Decode to specific format
//!
//! ```rust,ignore
//! use jpegli::decoder::{Decoder, PixelFormat, Result};
//!
//! fn decode_rgba(data: &[u8]) -> Result<Vec<u8>> {
//! let image = Decoder::new()
//! .output_format(PixelFormat::Rgba)
//! .decode(data)?;
//! Ok(image.into_pixels())
//! }
//! ```
// Note: Currently re-exporting internal error types since the decoder
// types we re-export from crate::decode use them internally.
// TODO: Create wrapper types or unified error type in the future.
// === Error types ===
// Re-export internal error types since the decoder types use them
pub use crate;
// === Main decoder types ===
pub use crate;
// === Metadata preservation types ===
pub use crate;
// === Types used in public structs ===
pub use crate;
// === ICC profile support ===
pub use crate;