pub struct OpcodeList {
pub opcodes: Vec<(DngOpcode, bool)>,
}Expand description
A parsed list of DNG opcodes from one of the OpcodeList1/2/3 TIFF tags.
Fields§
§opcodes: Vec<(DngOpcode, bool)>Parsed opcodes together with their is_optional flag.
is_optional == true means failures should be silently ignored.
Implementations§
Source§impl OpcodeList
impl OpcodeList
Sourcepub fn parse(data: &[u8]) -> Self
pub fn parse(data: &[u8]) -> Self
Parse an opcode list from the raw TIFF tag bytes (UNDEFINED type, big-endian).
Returns an empty list if data is shorter than 4 bytes.
Sourcepub fn apply_to_rgb(&self, image: &mut RgbImage)
pub fn apply_to_rgb(&self, image: &mut RgbImage)
Apply this opcode list to an RGB image.
Opcodes are applied in order. Unknown or unimplemented opcodes are skipped with a trace-level log. Optional opcodes that fail are silently ignored; required ones that fail are also ignored but logged at warn.
Trait Implementations§
Source§impl Clone for OpcodeList
impl Clone for OpcodeList
Source§fn clone(&self) -> OpcodeList
fn clone(&self) -> OpcodeList
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 OpcodeList
impl Debug for OpcodeList
Source§impl Default for OpcodeList
impl Default for OpcodeList
Source§fn default() -> OpcodeList
fn default() -> OpcodeList
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for OpcodeList
impl RefUnwindSafe for OpcodeList
impl Send for OpcodeList
impl Sync for OpcodeList
impl Unpin for OpcodeList
impl UnsafeUnpin for OpcodeList
impl UnwindSafe for OpcodeList
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