libheif_rs/metadata.rs
1use four_cc::FourCC;
2
3pub struct ImageMetadata {
4 /// An instance of `FourCC` indicating the type of the metadata,
5 /// as specified in the HEIF file.
6 ///
7 /// Exif data will have the type `b"Exif"`.
8 pub item_type: FourCC,
9 /// For EXIF, the content type is `""`.
10 ///
11 /// For XMP, the content type is `"application/rdf+xml"`.
12 pub content_type: String,
13 /// An absolute URI. Only valid for item_type == "uri".
14 pub uri_type: String,
15 /// The data is exactly as stored in the HEIF file.
16 ///
17 /// For Exif data, you probably have to skip the first four bytes of
18 /// the data, since they indicate the offset to the start of
19 /// the TIFF header of the Exif data.
20 pub raw_data: Vec<u8>,
21}