pub struct NikonMeta {
pub version: [u8; 2],
pub vpred: [[u16; 2]; 2],
pub tree: usize,
pub split_row: usize,
pub curve: Vec<u16>,
}Expand description
Decoded Nikon compression metadata (makernote tag 0x96 “NEFLinearizationTable”).
Fields§
§version: [u8; 2]Version bytes (0x44 0x10/0x20/0x40 lossy, 0x46 0x30 lossless, …).
vpred: [[u16; 2]; 2]§tree: usizeIndex into NIKON_TREES.
split_row: usizeRow at which the “after split” tree takes over (0 = none).
curve: Vec<u16>Linearisation curve indexed by the clamped predictor value (0x4000 entries).
Implementations§
Source§impl NikonMeta
impl NikonMeta
Sourcepub fn parse(meta: &[u8], order: ByteOrder, bits: u32) -> Result<Self>
pub fn parse(meta: &[u8], order: ByteOrder, bits: u32) -> Result<Self>
Parse the blob at makernote tag 0x96 (or 0x8C). meta starts at the tag’s value
and may extend to the end of the file (parsing may read beyond the tag).
Sourcepub fn is_lossless(&self) -> bool
pub fn is_lossless(&self) -> bool
Whether this is a lossless stream (no curve, identity mapping).
Trait Implementations§
Auto Trait Implementations§
impl Forget for NikonMeta
impl Freeze for NikonMeta
impl RefUnwindSafe for NikonMeta
impl Send for NikonMeta
impl Sync for NikonMeta
impl Unpin for NikonMeta
impl UnsafeUnpin for NikonMeta
impl UnwindSafe for NikonMeta
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