iPhone .jpg files with MPImage tags, "Error reading MPImage2 from file"

Started by calberga, October 26, 2024, 03:48:40 PM

Previous topic - Next topic

calberga

I am using exiftool version 99, on Windows 10.

I was attempting to set values in the -Comment tag of some photos taken with an iPhone Pro. 

The command used is:

exiftool -ext jpg "-comment<$directory/$filename" -charset cp1252 -charset filename=cp1252 -overwrite_original -F -r -P -v0 "D:/P/temp/" > D:/P/x/D-Savename-jpg.txt

On a few I am receiving the above error message.  I haven't examined all of the files, but on two:

MPImage1
   MPImageType  Baseline MP Primary Image
MPImage2
   MPImageType  Undefined

The other values seem reasonable, but if need I am happy to transcribe them.  The other, non error triggering, files all seem to have comparable MPImage1 (and 2) values.

When I display the photos in Irfanview the simple act as normal jpg files, but if I change the extension to .mpo and view them in Corel PaintShop the display two copies of the image with the same pixel count, thought the sizes given in the MPImage tags are different.

How can I determine what is getting exiftool upset with these files?  I am attaching one here.

I do note that despite the error message, the Comment was set correctly
   

Phil Harvey

The file was edited by some software that removed the MPF trailer completely.  Hence all of the MPImages are gone.

You can see this easily by looking at the -htmldump output in a web browser.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

calberga

Thank you.  The three programs I use for most of my fiddling around are Irfanview, Corel PaintShop, and MicroSoft ICE.  I do use a legacy program for bulk renaming, the old mp3/Tag Studio from Magnus BrĂ¥ding.  I use Exiftool for tagging and extracting tags.  The only processing I remember on the example photo was lossless rotations.  There must be something I did that I don't remember.  I have the backup copies, straight from the iPhone, so I'll just go back and use those, and see if I can mess them up again!

StarGeek

Quote from: calberga on October 27, 2024, 09:29:35 PMThe three programs I use for most of my fiddling around are Irfanview

I'm almost certain that this is the cause of the problem. I remember that at one point I had a number of images that had the IPTC data in the AFCP trailer and I lost data after running Irfanview's lossless jpeg rotation on them. It's still part of my workflow to check for the IPTC in the trailer, though I haven't come across one in quite a few years.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).