Changing Metadata -> jpg no longer visible in Viewer

Started by axel.hennig, April 07, 2025, 04:04:59 PM

Previous topic - Next topic

axel.hennig

Hi,

there is a quite interesting behaviour of the Viewer with the attached file (zipped that Metadata does not get deleted).

Steps to reproduce:

  • Import the attached image.
  • View the file in the Viewer and in the Quick-View and in the Slide-show. Everything works fine.
  • Show the following two Metadata-tags in the Metadata-panel (also in the zip-file is a Metadata-Panel-Layout (*.immdl-file) to easy show these two tags):
    Exif::Main\42032\OwnerName\0
    XMP::exifEX\CameraOwnerName\OwnerName\0
    Currently, they should show:
    Exif::Main\42032\OwnerName\0            : StefanWeissha
    XMP::exifEX\CameraOwnerName\OwnerName\0 : StefanWeissha
    sc2.jpg
  • Change the two OwnerName tags to (just adding a "p"):
    Exif::Main\42032\OwnerName\0            : StefanWeisshap
    XMP::exifEX\CameraOwnerName\OwnerName\0 : StefanWeisshap
    sc3.jpg
  • Write-back metadata.
  • View the file again in the Viewer and in the Quick-View and in the Slide-show. Now, only Slide-show works correctly. Viewer shows "This file cannot be displayed." (screenshot) and Quick-View shows "No cache image available. Displaying thumbnail" (screenshot).
    sc1.jpg
    sc4.jpg

Now, my questions:

  • Why is the Slide-show able to show the image, but the Viewer not? Different methods to render the image?
  • Why does changing Metadata breach the Viewer to show the image?
  • If I would import the changed image (step 5 image) into an new IMatch-DB, IMatch would be able create a thumbnail. So in general it is able to read the file (for thumbnail creation), but it cannot be shown in the Viewer. Why?

Due to the fact, that I'm not sure if this is an IMatch problem or maybe an exiftool problem, I've posted also a related question in the exiftool-Forum.

axel.hennig

Log-file (debug-log) of the above session attached.

Metadata Analyst app for the image above (in the zip-file) just shows:
Metadata Analyst Results. Version 2025.2.4. 4/7/2025 4:06:17 PM
File analyzed: D:\z_tmp\IMatch TEST\import\06 for IMatch forum\01.jpg
Errors: 0
Warnings: 1

Warning: [Legacy IPTC] Character Set Encoding: unspecified.

Mario

QuoteWhy is the Slide-show able to show the image, but the Viewer not?
The slide show loads JPG files via the JPG imaging library included in IMatch to be able to handle effects.

The Viewer and Quick View panel load JPG files via Windows WIC and DirectX directly into the graphic card for performance.

I would guess that your change somehow broke WIC and it no longer understands or likes the JPG file.
There is an error in the log:

D2D CacheManager: [88982f61] Der Imageheader ist unbekannt.

This error message is returned by the Windows WIC codec when it tries to load the JPG file.

I suggest you restore the image from backup and stay away from modifying these tags.

Or, maybe this is caused by the special nature of the source JPG? Who knows?
Open it in a respectable image editor and save it again to JPG.
Then repeat your test? Maybe the image this time does not become unreadable by WIC after ExifTool has modified it?
No idea, really.
First time that I see such an issue, and I have processed millions of JPEG files over the years.

Feel free to contact Microsoft support with this image and ask them to analyze why WIC does not like it.
Nothing IMatch can fix.

Update:

I added

Exif::Main\42032\OwnerName
Exif::Main\65000\OwnerName
XMP::exifEX\CameraOwnerName\OwnerName

to the MD panel, entered 3 different values and wrote back to a JPG file.

Exif::Main\65000\OwnerName has become empty, Exif::Main\42032\OwnerName  is the same as XMP::exifEX\CameraOwnerName\OwnerName  (XMP => EXIF sync).

Image still loads fine in Viewer and QVP.
Probably something specific about the data in your original JPG. See my test above for how to verify this.

axel.hennig

Thanks for looking into this.

Yes, everything works perfectly fine, when opening the file in another image-viewer and re-saving (and then editing again with exiftool). Works also fine again, when running:

exiftool.exe -overwrite_original -all= -tagsfromfile @ -all:all 01.jpg

I just wanted to understand why this happens.

One follow-up question: Is there a possibility (not necessarily within IMatch) to batch-test several jpg-files if WIC-codec fails or not (I've figured out, that I have this problem with a couple of files and I would like to detect them)?

Mario


QuoteI just wanted to understand why this happens. 
I suggest you send a problem JPG file to to Microsoft support so they can forward the image to the team creating the WIC codec.
I see the same error message "Image header unknown" as you and googling for it or the error code 88982f61 not really produces anything useful.


Mario

Very good. Let's see what Microsoft comes up with.

axel.hennig

A little bit as expected. They are claiming ExifTool to be the problem...

sc1.jpg

axel.hennig

Just, if someone is interested: On the exiftool-Forum Frank clearly described the problem (Windows bug).

I've made a bug report via Windows Feedback Hub app (not completely sure, but I think that's the way how to report bugs).

Mario