#[non_exhaustive]pub enum J2kFileColorSpec<'a> {
Infer,
Enumerated(Colorspace),
IccProfile(&'a [u8]),
}Expand description
Color metadata to write into a JP2/JPH Colour Specification box.
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.
Infer
Infer an enumerated JP2 colorspace from the codestream component count and parsed JPEG 2000 color transform metadata.
Enumerated(Colorspace)
Write an enumerated JP2 colorspace.
IccProfile(&'a [u8])
Write an ICC-profile Colour Specification box.
Implementations§
Source§impl<'a> J2kFileColorSpec<'a>
impl<'a> J2kFileColorSpec<'a>
Sourcepub fn from_inspected(color_spec: &'a J2kColorSpec) -> Option<Self>
pub fn from_inspected(color_spec: &'a J2kColorSpec) -> Option<Self>
Return a directly representable JP2/JPH colour specification borrowed from inspected file metadata.
Sourcepub fn from_file_metadata(metadata: &'a J2kFileMetadata) -> Option<Self>
pub fn from_file_metadata(metadata: &'a J2kFileMetadata) -> Option<Self>
Return the first directly representable JP2/JPH colour specification from inspected file metadata.
Trait Implementations§
Source§impl<'a> Clone for J2kFileColorSpec<'a>
impl<'a> Clone for J2kFileColorSpec<'a>
Source§fn clone(&self) -> J2kFileColorSpec<'a>
fn clone(&self) -> J2kFileColorSpec<'a>
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 moreimpl<'a> Copy for J2kFileColorSpec<'a>
Source§impl<'a> Debug for J2kFileColorSpec<'a>
impl<'a> Debug for J2kFileColorSpec<'a>
impl<'a> Eq for J2kFileColorSpec<'a>
Source§impl<'a> PartialEq for J2kFileColorSpec<'a>
impl<'a> PartialEq for J2kFileColorSpec<'a>
impl<'a> StructuralPartialEq for J2kFileColorSpec<'a>
Auto Trait Implementations§
impl<'a> Freeze for J2kFileColorSpec<'a>
impl<'a> RefUnwindSafe for J2kFileColorSpec<'a>
impl<'a> Send for J2kFileColorSpec<'a>
impl<'a> Sync for J2kFileColorSpec<'a>
impl<'a> Unpin for J2kFileColorSpec<'a>
impl<'a> UnsafeUnpin for J2kFileColorSpec<'a>
impl<'a> UnwindSafe for J2kFileColorSpec<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more