pub struct IccProfile { /* private fields */ }Expand description
Embedded ICC profile data.
Implementations§
Source§impl IccProfile
impl IccProfile
Sourcepub fn srgb() -> Self
pub fn srgb() -> Self
Create an sRGB ICC profile.
This is a minimal sRGB profile suitable for embedding in most images. The profile is based on the sRGB IEC61966-2.1 specification.
Sourcepub fn from_bytes(data: Vec<u8>) -> Self
pub fn from_bytes(data: Vec<u8>) -> Self
Create an ICC profile from raw bytes.
Sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Check if this is a valid ICC profile.
Performs basic validation by checking the magic bytes.
Sourcepub fn append_to_jpeg(&self, jpeg_data: Vec<u8>) -> Result<Vec<u8>, IccError>
pub fn append_to_jpeg(&self, jpeg_data: Vec<u8>) -> Result<Vec<u8>, IccError>
Append ICC profile to existing JPEG data.
Uses img-parts for segment manipulation.
Trait Implementations§
Source§impl Clone for IccProfile
impl Clone for IccProfile
Source§fn clone(&self) -> IccProfile
fn clone(&self) -> IccProfile
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 IccProfile
impl Debug for IccProfile
Auto Trait Implementations§
impl Freeze for IccProfile
impl RefUnwindSafe for IccProfile
impl Send for IccProfile
impl Sync for IccProfile
impl Unpin for IccProfile
impl UnsafeUnpin for IccProfile
impl UnwindSafe for IccProfile
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, Ctx> BundleDefault<Ctx> for Twhere
T: Default,
impl<T, Ctx> BundleDefault<Ctx> for Twhere
T: Default,
Source§fn default_with_context(_: Ctx) -> T
fn default_with_context(_: Ctx) -> T
Creates a default value with the given context.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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