ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: orionr on November 03, 2017, 02:04:23 PM

Title: How to adjust MP Image values on resize?
Post by: orionr on November 03, 2017, 02:04:23 PM
Hi Phil,

exiftool is a great piece of software! Very well done. I'm trying to extract depth maps from iOS 11 Portrait Mode photos and it works great on the original image with exiftool a.jpg -b -MPImage2 > a_depth.jpg. However, I have an image that was resized and all of the EXIF headers copied over. Unfortunately when I try to extract depth from this with exiftool a_resized.jpg -b -MPImage2 I get the error

Warning: Error reading MPImage2 from file - a_resized.jpg

I've confirmed the field is the same length as the original, but maybe it's been corrupted in some way? Does resizing typically affect these binary EXIF entries? Any thoughts on how to debug given that I can't extract with exiftool would also be greatly appreciated.

I've attached the resized image just in case you have some ideas. Unfortunately the original was too big to attach. Thank you again for creating a great tool!

Orion
Title: Re: How to adjust MP Image values on resize?
Post by: orionr on November 03, 2017, 04:14:12 PM
After more investigation, it looks like the EXIF headers are copied over, but the MP Image 2 data (after inspecting hex) might no longer be there... that would explain it. Phil, any pointers or thoughts on how to copy (or preserve) this on resize? This is in the technical weeds, I know. :) Thanks again.
Title: Re: How to adjust MP Image values on resize?
Post by: Phil Harvey on November 03, 2017, 10:04:53 PM
I know of no software that will preserve the MPImage during a resize.  One would expect there would be something out there, but it would be specialized to handle this sort of thing.

- Phil