Struct rexif::IfdEntry [−][src]
pub struct IfdEntry { pub namespace: Namespace, pub tag: u16, pub format: IfdFormat, pub count: u32, pub data: Vec<u8>, pub ifd_data: Vec<u8>, pub ext_data: Vec<u8>, pub le: bool, }
Expand description
Structure that represents a parsed IFD entry of a TIFF image
Fields
namespace: Namespace
Expand description
Namespace of the entry. Standard is a tag found in normal TIFF IFD structure, other namespaces are entries found e.g. within MarkerNote blobs that are manufacturer-specific.
tag: u16
Expand description
IFD tag value, may or not be an EXIF tag
format: IfdFormat
Expand description
IFD data format
count: u32
Expand description
Number of items, each one in the data format specified by format
data: Vec<u8>
Expand description
Raw data as a vector of bytes. Length is sizeof(format) * count. Depending on its size, it came from different parts of the image file.
ifd_data: Vec<u8>
Expand description
Raw data contained within the IFD structure. If count * sizeof(format) >= 4, this item contains the offset where the actual data can be found
ext_data: Vec<u8>
Expand description
Raw data contained outside of the IFD structure and pointed by ifd_data, if data would not fit within the IFD structure
le: bool
Expand description
If true, integer and offset formats must be parsed from raw data as little-endian. If false, integer and offset formats must be parsed from raw data as big-endian.
It is important to have ‘endianess’ per IFD entry, because some manufacturer-specific entries may have fixed endianess (regardeless of TIFF container’s general endianess).
Implementations
impl IfdEntry
[src]
impl IfdEntry
[src]pub fn data_as_offset(&self) -> usize
[src]
pub fn try_data_as_offset(&self) -> Option<usize>
[src]
pub fn try_data_as_offset(&self) -> Option<usize>
[src]Casts IFD entry data into an offset. Not very useful for the crate client. The call can’t fail, but the caller must be sure that the IFD entry uses the IFD data area as an offset (i.e. when the tag is a Sub-IFD tag, or when there are more than 4 bytes of data and it would not fit within IFD).
pub fn size(&self) -> u8
[src]
pub fn size(&self) -> u8
[src]Returns the size of an individual element (e.g. U8=1, U16=2…). Every IFD entry contains an array of elements, so this is NOT the size of the whole entry!
pub fn length(&self) -> usize
[src]
pub fn length(&self) -> usize
[src]Total length of the whole IFD entry (element count x element size)
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for IfdEntry
impl Send for IfdEntry
impl Sync for IfdEntry
impl Unpin for IfdEntry
impl UnwindSafe for IfdEntry
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more