#[non_exhaustive]pub enum ImageColorSpace {
DeviceGray,
DeviceRGB,
DeviceCMYK,
ICCBased {
n: u32,
profile_hash: ProfileHash,
profile_data: Arc<Vec<u8>>,
},
Indexed {
base: Box<ImageColorSpace>,
hival: u32,
lookup: Vec<u8>,
},
CIEBasedABC {
params: Arc<CieAbcParams>,
},
CIEBasedA {
params: Arc<CieAParams>,
},
Lab {
white_point: [f64; 3],
range: [f64; 4],
},
Separation {
name: Vec<u8>,
alt_space: Box<ImageColorSpace>,
tint_table: Arc<TintLookupTable>,
},
DeviceN {
names: Vec<Vec<u8>>,
alt_space: Box<ImageColorSpace>,
tint_table: Arc<TintLookupTable>,
},
Mask {
color: DeviceColor,
polarity: bool,
},
PreconvertedRGBA,
}Expand description
VM-free color space enum for images stored in the display list.
Marked #[non_exhaustive]; cross-crate match expressions need a
wildcard arm to remain forward-compatible.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
DeviceGray
DeviceRGB
DeviceCMYK
ICCBased
Indexed
CIEBasedABC
Fields
§
params: Arc<CieAbcParams>CIEBasedA
Fields
§
params: Arc<CieAParams>Lab
CIE Lab* color space (PDF /Lab or ICCBased Lab alternate).
Sample byte layout: 3 components (L, a, b), 8-bit each. Decode
scales bytes: L = byte/255 × 100; a = byte/255 × (range[1]-range[0]) + range[0];
b = byte/255 × (range[3]-range[2]) + range[2].
Separation
DeviceN
Mask
PreconvertedRGBA
Implementations§
Source§impl ImageColorSpace
impl ImageColorSpace
Sourcepub fn num_components(&self) -> u32
pub fn num_components(&self) -> u32
Number of components per sample.
Trait Implementations§
Source§impl Clone for ImageColorSpace
impl Clone for ImageColorSpace
Source§fn clone(&self) -> ImageColorSpace
fn clone(&self) -> ImageColorSpace
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ImageColorSpace
impl Debug for ImageColorSpace
Auto Trait Implementations§
impl Freeze for ImageColorSpace
impl RefUnwindSafe for ImageColorSpace
impl Send for ImageColorSpace
impl Sync for ImageColorSpace
impl Unpin for ImageColorSpace
impl UnsafeUnpin for ImageColorSpace
impl UnwindSafe for ImageColorSpace
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more