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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77


//! Read and write OpenEXR images.
//! This library uses no foreign code or unsafe Rust.
//!
//! See the [README.md](https://github.com/johannesvollmer/exrs/blob/master/README.md) for more information,
//! or check out the [examples](https://github.com/johannesvollmer/exrs/tree/master/examples).

#![warn(
    rust_2018_idioms,
    future_incompatible,
    unused_extern_crates,
    unused,

    missing_copy_implementations,
    missing_debug_implementations,

    clippy::all,
    clippy::restriction,
    clippy::pedantic,
    clippy::nursery,
    clippy::cargo,
)]

#![deny(
    unused_variables,
    unused_assignments,
    dead_code,
    unused_must_use,
    missing_copy_implementations,
    trivial_numeric_casts,
    redundant_semicolon
)]

#![forbid(unsafe_code)]
#![warn(missing_docs)]


pub mod io; // public to allow for custom attribute byte parsing

pub mod math;
pub mod chunks;
pub mod compression;
pub mod meta;
pub mod image;
pub mod error;

#[macro_use]
extern crate smallvec;

#[allow(unused)] // this is a dev dependency
#[cfg(test)]
extern crate image as piston_image;

/// Re-exports of all modules types commonly required for simple reading and writing of an exr image.
pub mod prelude {

    // main exports
    pub use crate::meta::MetaData;

    pub use crate::image::{simple, rgba, write_options, read_options, WriteOptions, ReadOptions};

    // secondary data types
    pub use crate::meta;
    pub use crate::meta::attributes;
    pub use crate::error;

    // re-export external stuff
    pub use half::f16;

    // export real types and attributes
    pub use crate::math::Vec2;
    pub use attributes::{ Compression, Text, IntRect, };
}