1#![warn(
9 rust_2018_idioms,
10 future_incompatible,
11 unused_extern_crates,
12 unused,
13 missing_copy_implementations,
14 missing_debug_implementations,
15 clippy::all,
16 clippy::pedantic,
17 clippy::nursery,
18 clippy::cargo
19)]
20#![deny(
21 unused_variables,
22 unused_assignments,
23 dead_code,
24 unused_must_use,
25 missing_copy_implementations,
26 trivial_numeric_casts,
27 redundant_semicolons
28)]
29#![forbid(unsafe_code)]
30#![warn(missing_docs)]
31
32pub mod io; pub mod compression;
35pub mod image;
36pub mod math;
37pub mod meta;
38
39pub mod block;
40pub mod error;
41
42#[macro_use]
43extern crate smallvec;
44
45pub mod prelude {
49
50 pub mod traits {
53 pub use crate::image::{
54 crop::{ApplyCroppedView, Crop, CropResult, CropWhere, CroppedChannels, InspectSample},
55 read::{
56 any_channels::ReadSamples,
57 image::{ReadImage, ReadLayers},
58 layers::ReadChannels,
59 read,
60 specific_channels::ReadSpecificChannel,
61 },
62 write::{channels::GetPixel, WritableImage},
63 };
64 }
65
66 pub use half::f16;
68 pub use smallvec::SmallVec;
69 pub use traits::*;
70
71 pub use crate::error::{Error, Result};
73 pub use crate::image::{
74 read::{
75 read_all_data_from_file, read_all_flat_layers_from_file,
76 read_all_rgba_layers_from_file, read_first_flat_layer_from_file,
77 read_first_rgba_layer_from_file,
78 },
79 write::{write_rgb_file, write_rgba_file},
80 };
81 pub use crate::math::Vec2;
83 pub use crate::{
85 block::samples::Sample,
86 image::*,
87 meta::{
88 attribute,
89 attribute::{
90 AttributeValue, ChannelDescription, Compression, IntegerBounds, LineOrder,
91 SampleType, Text, TileDescription,
92 },
93 header::{ImageAttributes, LayerAttributes},
94 MetaData,
95 },
96 };
97}