Metadata not always recorded by Windows Photo Gallery

Started by fasyl, September 15, 2024, 03:04:48 PM

Previous topic - Next topic

fasyl

Hello,
I have been using Windows Photo Gallery for over a decade; it worked nicely to quickly rate and tag pictures.  I then use exiftool to fetch best-rated pictures for archiving (cloud + external HDD for redundancy) and send to a raspberry pi connected to a screen in the living room.
All works rather smoothly BUT I realized to my horror that *few* pictures tagged with Windows Photo Gallery do not get the rating recorded in the photo file (not in EXIF nor in XMP).
Example: I tag a picture 5-stars in Windows Photo Gallery but it does not  get recorded in the picture: I do not see it in the exiftool output;  it does not appear in the Properties of the file (through right-click, Properties in windows).  Irfanview does not see the rating either.
When I try to set the rating through the Properties popup of the file, I get an error "0X88982F52 There is too much metadata to be written ....".  --> quick google search explained that this is due to a 'too large' thumbnail; I erased the thumbnail and was able to rank the picture.

So, I now know how to fix.
BUT, my big concern is that I probably have tens / thousands of similar pictures where I recorded a rating in Windows Photo Gallery but it did not get registered in the picture;  which in turns mean that the picture does not get picked by exiftools --> no backup and no display :(

1) Do you know where Windows Photo Gallery stores its metadata ?   (Windows Photo Gallery does see the 5-stars rating eventhough it is not in the file;  so, it must be storing this somewhere like a database or somehting)
2) Do you know how to detect such ''too big thumbnail'' using exiftool?   (I could then search potentially 'unfit' pictures and lookup their ratings in Windows Photo Gallery; then fix the picture and re-rate properly)

StarGeek

A quick google shows that the database would be in one of these directories, depending upon the Photo Gallery version and Windows version
%userprofile%\AppData\Local\Microsoft\Windows Live Photo Gallery
%userprofile%\AppData\Local\Microsoft\Windows Photo Gallery
%userprofile%\Local Settings\Application Data\Microsoft\Windows Live Photo Gallery

and it would be called "Pictures.pd4" or "Pictures.pd5"

See here, though the topic is for a different problem, it has the names and locations.

Actually reading the database is a different problem.

As for figuring out which files might need editing, I think the problem was that Windows can't read/write extended EXIF in JPEGs. Chunks in JPEGs are limited to ~65,000 characters (unsigned short-header characters), so if the EXIF is bigger than that, it is split into extended EXIF chunks.

I think this might work to get a list (use CMD, not Powershell)
exiftool -if "${exif;s/\D//g}>65500" -Filepath /path/to/files/
"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