pub struct IFDEntry {
pub tag: u16,
pub field_type: u16,
pub count: u64,
pub value_offset: u64,
}Expand description
Represents an entry in an Image File Directory (IFD)
Each entry describes one aspect of the image (dimensions, color space, compression, etc.) using a tag-value pair. The field_type determines how to interpret the value or offset.
Fields§
§tag: u16TIFF tag identifier
field_type: u16Field type
count: u64Number of values
value_offset: u64Value or offset to values
Implementations§
Source§impl IFDEntry
impl IFDEntry
Sourcepub fn new(tag: u16, field_type: u16, count: u64, value_offset: u64) -> Self
pub fn new(tag: u16, field_type: u16, count: u64, value_offset: u64) -> Self
Creates a new IFD entry
This constructs a tag entry with the specified parameters. For small values, value_offset contains the actual value. For larger values, it contains an offset to where the value is stored.
Sourcepub fn get_field_type_size(&self) -> usize
pub fn get_field_type_size(&self) -> usize
Get the size in bytes for this entry’s field type
Different TIFF field types take up different amounts of space. This method returns how many bytes a single value of this entry’s type requires.
Sourcepub fn is_value_inline(&self, is_big_tiff: bool) -> bool
pub fn is_value_inline(&self, is_big_tiff: bool) -> bool
Determines if the value is stored inline in value_offset rather than at the offset location
TIFF format allows small values to be stored directly in the IFD entry rather than requiring a separate data area. This method determines if this entry’s value is stored inline or at an external offset.
Sourcepub fn description(&self) -> String
pub fn description(&self) -> String
Returns a human-readable description of this entry
This is useful for debugging and logging purposes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IFDEntry
impl RefUnwindSafe for IFDEntry
impl Send for IFDEntry
impl Sync for IFDEntry
impl Unpin for IFDEntry
impl UnsafeUnpin for IFDEntry
impl UnwindSafe for IFDEntry
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
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>
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