problems writing binary data to an existing tag

Started by alex9000, August 06, 2020, 11:43:00 AM

Previous topic - Next topic

alex9000

Hello,
I've been using exiftool to work with the depth maps in portrait mode images.  Getting the depth maps out is easy and well documented.  Now, I'm working on an application where I modify the depth map and overwrite the original image.

I'm working with iOS portrait mode photos, so the depth map is in the -MPImage2 tag

when I run:
  exiftool -s test-lumen.jpg
I get:
MPImage2                        : (Binary data 36947 bytes, use -b option to extract)

And I can extract the data easily using:
exiftool -b -MPImage2 test-lumen.jpg > depthMap.jpg

I'm having trouble when I try to write a modified depth map back into the tag.

I've been doing:
exiftool '-MPImage2<=new-depth.jpg' test-lumen.jpg 
but I get back
Warning: Tag 'MPImage2' is not defined
Nothing to do.


I feel like I'm missing an option to specify that I'm writing a binary file.  I haven't found an example of writing a binary file into a tag, so I'm just going with the regular 'write tag data from a file' example, just like I would if I were writing a thumbnail image.  I'm not sure why it's saying the tag isn't defined, though.  Do I need to do anything different when it comes to binary data?  Is there some issue with tag write permissions?  I'm attaching the file I'm working with, for reference.  I'm a little lost in the dark here, and I'd appreciate any help. 

StarGeek

If you check the MPF tag page, you'll see that exiftool doesn't write any of those tags.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype