Files Windows can't read or write tags from or to - Error 0x88982F63

Started by clearsky, October 29, 2020, 03:39:25 PM

Previous topic - Next topic

clearsky

Hi

I have jpegs that Windows 7 & Windows 10 refuse to read or write tags from/to when using File Properties -> Details.  The error displayed when you try to update them is as follows;

QuoteAn unexpected error is keeping you from applying properties to the file. If you continue to receive this error, you can use the error code to search for help with this problem.

Error 0x88982F63: The image metadata header is unrecognised.
That's Windows 10, on 7 it omits the description with "No error description is available".
I've tried to attached an image of this.

This is easy enough to fix by using an image editor to save the file but I need to find them; hopefully with ExifTool.  ExifTool allows me to tag these files without complaining which is great, except Windows still doesn't read the tags afterwards.

ExifTool output for the broken file:

ExifTool Version Number         : 12.08
File Name                       : 0001.jpg
Directory                       : TestPhotosWrite/Damaged
File Size                       : 221 kB
File Modification Date/Time     : 2020:10:29 15:09:54+00:00
File Access Date/Time           : 2020:10:29 15:10:11+00:00
File Creation Date/Time         : 2020:10:29 15:10:11+00:00
File Permissions                : rw-rw-rw-
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
JFIF Version                    : 1.01
Exif Byte Order                 : Little-endian (Intel, II)
Image Description               : description
Make                            : Eastman Kodak Company
Camera Model Name               : KODAK OFFICE HERO 6.1 AiO
Orientation                     : Horizontal (normal)
X Resolution                    : 300
Y Resolution                    : 300
Resolution Unit                 : inches
Modify Date                     : 2014:02:14 23:31:07
Exif Version                    : 0232
Date/Time Original              : 2014:02:14 15:24:51
Components Configuration        : Y, Cb, Cr, -
Flashpix Version                : 0100
Color Space                     : sRGB
XMP Toolkit                     : Image::ExifTool 12.08
Subject                         : ExiftoolDateTimeOriginalUpdateGAG
Image Width                     : 1180
Image Height                    : 1764
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:4:4 (1 1)
Image Size                      : 1180x1764
Megapixels                      : 2.1


I don't know where this came from "Image Description               : description".

ExifTool Output for the fixed file

ExifTool Version Number         : 12.08
File Name                       : 0001-SavedWithPaintWin7.jpg
Directory                       : TestPhotosWrite/Damaged
File Size                       : 408 kB
File Modification Date/Time     : 2020:10:29 18:29:51+00:00
File Access Date/Time           : 2020:10:29 18:29:51+00:00
File Creation Date/Time         : 2020:10:29 18:28:54+00:00
File Permissions                : rw-rw-rw-
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
JFIF Version                    : 1.01
Resolution Unit                 : inches
X Resolution                    : 300
Y Resolution                    : 300
Exif Byte Order                 : Big-endian (Motorola, MM)
Image Description               : Updated with Win7 Properties-Details
XP Title                        : Updated with Win7 Properties-Details
Padding                         : (Binary data 2060 bytes, use -b option to extract)
About                           : uuid:faf5bdd5-ba3d-11da-ad31-d33d75182f1b
Title                           : Updated with Win7 Properties-Details
Description                     : Updated with Win7 Properties-Details
Image Width                     : 1180
Image Height                    : 1764
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
Image Size                      : 1180x1764
Megapixels                      : 2.1


I added "Updated with Win7 Properties-Details" with the file properties.

To a more educated eye there could be something really obvious in there to help me find all of these files.  The problem being that the only other way I can identify these is to try and update all 50,000 files.   :-\

Now the gratitude and motivation for posting this question.

ExifTool is truly a mind-blowing program, as is the subject of tagging.  I've been reading through the documentation and forum for a couple of weeks now and it would take me a lifetime to understand it; so thank you for your work and continued commitment.

I know that ExifTool isn't an image validator but it's the best hope anybody could have to identify these files and possibly the cause of this problem.  Having read through the Microsoft forums looking for an answer to this there's very little chance of finding a solution there.  Hopefully there is an answer to this and it will help somebody else in future.  Thank you for allowing me to document it here.

The only post I've found here similar is this https://exiftool.org/forum/index.php?topic=9109.msg47062#msg47062.  Interestingly the few files I have found are also Kodak; I would like to confirm the suspicious that these files have been created by my scanner.

Phil Harvey

Try running this command on a damaged file to see what you get:

exiftool -validate -warning -a FILE

- 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 ($).

StarGeek

This might also be a permissions or ownership problem, though it seems unlikely if exiftool is able to edit the file.  Unless you're running as Admin.  See this page.
* 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).

StarGeek

Quote from: clearsky on October 29, 2020, 03:39:25 PM
This is easy enough to fix by using an image editor to save the file but I need to find them; hopefully with ExifTool.

Also, this would be a destructive resave.  You will lose image data each time you do this.  Another option you might try is to use Irfanview and it's Lossless Jpeg Rotation.  Example dialog shown below.
* 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).

Phil Harvey

Quote from: StarGeek on October 29, 2020, 05:45:38 PM
This might also be a permissions or ownership problem, though it seems unlikely if exiftool is able to edit the file.  Unless you're running as Admin.  See this page.

Oh yeah.  It could be a permission problem.  ExifTool can write read-only files.  Read here.

- 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 ($).

clearsky

Wow, thank you both for your responses.  :-)

First suggestion - exiftool -validate -warning -a 0001.jpg
Validate                        : 6 Warnings (3 minor)
Warning                         : Wrong IFD for 0xa001 ColorSpace (should be ExifIFD not IFD0)
Warning                         : Missing required JPEG ExifIFD tag 0xa002 ExifImageWidth
Warning                         : Missing required JPEG ExifIFD tag 0xa003 ExifImageHeight
Warning                         : [minor] IFD0 tag 0x0100 ImageWidth is not allowed in JPEG
Warning                         : [minor] IFD0 tag 0x0101 ImageHeight is not allowed in JPEG
Warning                         : [minor] Missing required JPEG IFD0 tag 0x0213 YCbCrPositioning


I don't understand this, yet, but it looks interesting I'll try and learn about it tomorrow.  Does it provide any clues Phil/Stargeek?

Second suggestion - permissions & Microsoft Community Post
It's not read only...
C:etc> attrib 0001.jpg
A                    C:\Users\Garth\Programming\EXIFTool Testing\TestPhotosWrite\Damaged\0001.jpg


NB. I can change the attrib's through DOS with +r and -r, so it wasn't read only, and I checked in Windows GUI beforehand.

I have Full Control and own the file.
C:etc>icacls 0001.jpg
0001.jpg NT AUTHORITY\SYSTEM:(I)(F)
         BUILTIN\Administrators:(I)(F)
         LENNY\Garth:(I)(F)

      
I've never used that command before just wanted to try a CLI command to print permissions; I think (I) (F) means Inherited, Full Control.  I've checked in the GUI and for my account "Garth" I have Full Control (with read/write/execute/modify) and I am the Owner.

That was the most interesting Microsoft community response I think I've ever read.   ;)  It's similar but I don't think it gives any clues because they all seem to know where their problems emanate from and I don't use any Apple devices.

Third suggestion - Irfan view & non destructive updates
I didn't know about that application, I'll have a look, thank you.  I was cautious about doing any mass re-save until I could identify the files so that I could check my digital asset databases; I use Digikam and Windows (Live) Photo Gallery.  WLPG is how I became aware I had this problem a couple of years ago when I realised that it had been pretending to update the files but really it was only updating it's own database; and it must just ignore the OS errors that are generated when it attempts to update the tags.

Phil Harvey

None of those warnings with -validate are serious.  They shouldn't prevent a file from being written.

- 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 ($).

StarGeek

I should have mentioned, the Jpeg Lossless Rotation is part of the Plug-in package.
* 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).

clearsky

I've tried various edits with Irfanview; rotations, tag updates, date updates, nothing removed whatever is stopping Windows from reading/writing tags.

I've tried updating with the DigiKam Metadata Editor.  I add details to the EXIF fields click Apply it just resets them whatever I type in without raising an error.  I also tried adding a descriptive tag to a group of these images and it added that tag to the image in the DigiKam database but it didn't update the files, and Windows still generates the error.

I decided to try exiftool -all= 0001.jpg and that fixed it, Windows could write new tags and read them back.

Following on from that I thought if I wrote a batch file try and remove the tags one by one and see if I could identify if there was a problem tag, a long-shot because Windows claims the problem is in the "metadata header."  Non of these removals worked.

The only thing I can think to do now is to add a dummy tag to all my photos and the ones that don't get updated are the problem files.

StarGeek

* 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).

clearsky


Phil Harvey

It's a long shot, but maybe try exiftool -jfif:all= 0002.jpg

- 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 ($).

StarGeek

I should have paid more attention to your first post.  The error message of "The image metadata header is unrecognised" should have been a clue.  There's something about the EXIF data that Windows doesn't like.  Basically a FAQ #20, but just need to limit it to the EXIF group.

exiftool -exif:all= -tagsfromfile @ -exif:all /path/to/files/
* 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).

Phil Harvey

Ah.  I see the problem now!  It wasn't a problem with the JFIF as I had guessed.  The EXIF has the wrong TIFF magic number.  It should be 0x2a 0x00, but it is 0x98 0xeb.  You can fix this as StarGeek says.

I'll add a check for this in the -validate tests.

- 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 ($).

clearsky

Fantastic that worked on a test file!  Thank you StarGeek & Phil.

If there's a possibility of losing metadata then I only want to do this to the affected files, right?

And because this is a Metadata header issue (presuming the hex is part of that?) then I can't currently apply an -if option to find these files with Exiftool?  Or am I underestimating it again?

I'm going away to figure out how that command works now.  ;-)