1pub mod channels;
4#[allow(clippy::module_inception)]
5mod luma;
6
7use crate::encoding::{Gamma, Linear, Srgb};
8use crate::white_point::D65;
9
10pub use self::luma::{Iter, Luma, Lumaa};
11
12pub type SrgbLuma<T = f32> = Luma<Srgb, T>;
14pub type SrgbLumaa<T = f32> = Lumaa<Srgb, T>;
16
17#[doc(alias = "linear")]
19pub type LinLuma<Wp = D65, T = f32> = Luma<Linear<Wp>, T>;
20#[doc(alias = "linear")]
22pub type LinLumaa<Wp = D65, T = f32> = Lumaa<Linear<Wp>, T>;
23
24pub type GammaLuma<T = f32> = Luma<Gamma<D65>, T>;
26pub type GammaLumaa<T = f32> = Lumaa<Gamma<D65>, T>;
28
29pub trait LumaStandard {
31 type WhitePoint;
33
34 type TransferFn;
36}
37
38impl<Wp, Tf> LumaStandard for (Wp, Tf) {
39 type WhitePoint = Wp;
40 type TransferFn = Tf;
41}
42
43pub type PackedLumaa<P = u16> = crate::cast::Packed<channels::La, P>;
45
46pub type PackedAluma<P = u16> = crate::cast::Packed<channels::Al, P>;