Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion crates/zune-jpeg/src/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,9 @@ pub struct ImageInfo {
/// Extended XMP Guid
pub extended_xmp_guid: Option<Vec<u8>>,
/// Image sub-sampling ratio
pub sample_ratio: SampleRatios
pub sample_ratio: SampleRatios,
/// The offset at which Multi picture information was found
pub multi_picture_information_offset: Option<u64>,
}

impl ImageInfo {
Expand Down
1 change: 1 addition & 0 deletions crates/zune-jpeg/src/headers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,7 @@ pub(crate) fn parse_app2<T: ZByteReaderTrait>(
trace!("MPF Signature present");
length = length.saturating_sub(MPF_DATA.len());
decoder.stream.skip(MPF_DATA.len())?;
decoder.info.multi_picture_information_offset = Some(decoder.stream.position()?);
// MPF signature taken from here
// https://github.com/google/libultrahdr/blob/bf2aa439eea9ad5da483003fa44182f990f74091/lib/include/ultrahdr/multipictureformat.h#L50
// https://github.com/google/libultrahdr/blob/bf2aa439eea9ad5da483003fa44182f990f74091/lib/src/multipictureformat.cpp#L36
Expand Down