Page 1 of 1

Meta Data Corruption

Posted: Fri Feb 05, 2021 3:02 am
by brb
Subject: 0.98.1: Cropping corrupts meta data under Windows 10

XnView: MP 0.98.1 - 64 bit
OS: Windows 10 64 bit

Cropping a picture corrupts the meta data on a jpg. It becomes necessary to run EXIF against the image to correct it and allow edits to the meta data.

To reproduce:
1. Crop a jpg and save it.
2. Right click jpg and select Properties.
3. Go to Details tab and add a comment.
4. Try to save the change (click OK or Apply). You will get an error box.

Running EXIF with the following parameters fixes the jpg file.

"D:\Software and Drivers\Tools\exiftool" -all= -tagsfromfile @ -all:all -unsafe -icc_profile xxx.jpg

Re: Meta Data Corruption

Posted: Fri Feb 05, 2021 8:46 am
by xnview
could you send me a sample file, and the exact step to reproduce?

Re: Meta Data Corruption

Posted: Fri Feb 05, 2021 6:14 pm
by brb
I've attached an original and cropped image. You can change the comment (xxx) in the original image, but not in the cropped image.

Properties> Details> Comments

Rotating and saving an image also produces the problem.

Re: Meta Data Corruption

Posted: Mon Feb 08, 2021 9:45 am
by xnview
i can't reproduce, could you pot screenshot of steps? which settings>Formats>Write>JPEG do you have?

Re: Meta Data Corruption

Posted: Mon Feb 08, 2021 4:20 pm
by brb
The steps are in the original post. Crop the picture, save it, then try to add a comment via the Properties dialog.

All settings in XNviewMP are at default. I do not use any custom settings.

Re: Meta Data Corruption

Posted: Mon Feb 08, 2021 5:21 pm
by michel038
1
- I cropped my own jpg, saved it.
- return to browser mode, right clic, properties (= Windows properties) details, select "comment", enter a comment, apply, ok,
Windows has entered an exif comment without error.
Same result if my jpg has some xmp metadata

2
I downloaded your cropped picture, right click, found a "xxx" comment, edit, apply : I get a Windows error box : 0x80070057
I had to use "Tools, Metadata, Clean, XMP"
When xmp metadata are deleted, I can modify Windows comment
In this cropped file, XMP: HDRP Maker note seems deleted or not read in Exiftool tab, and in XMP tab neither.

3
I downloaded your original picture, cropped it : I get the same error. I need to delete xmp metadata to make Windows be able to manage details.
It seems that XnViewMP does not handle some of the xmp metadata created by HDR software . :bugconfirmed:


4
If ExifTool builds a sidecar, I get this error : (I think ExifTool has found the bug !)

Code: Select all

 "XMP format error <no closing tag for x:xmpmeta>
but a right sidecar file is built

Code: Select all

<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>

<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.1.0-jc003">
	<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="" xmlns:xmpNote="http://ns.adobe.com/xmp/note/" xmpNote:HasExtendedXMP="5249587BDE60EC68A062A1B6FFED4020"/>
	</rdf:RDF>
</x:xmpmeta>
 <?xpacket end='w'?><?xpacket end='w'?>

Re: Meta Data Corruption

Posted: Mon Feb 08, 2021 8:36 pm
by brb
Yes, you've recreated the error. Thanks for the tip regarding using Tools> Metadata to fix it within XnView.

Any kind of modification to the original jpg seems to induce the error. In addition to cropping an image, I've also encountered it when rotating the image.

I find that once I use the Tools> Metadata option to repair the error, I no longer run into problems when modifying the image (crop, rotate), and then go in and change the comment.

I've seen the problem with pictures taken on Google Pixel 2 and Pixel 4 smartphones. Is it possible the phones are not writing the metadata correctly?

Re: Meta Data Corruption

Posted: Tue Feb 09, 2021 12:56 pm
by xnview
:bugconfirmed: Thanks to your detailed description I can reproduce the problem.
The JPEG file uses Extended XMP data

Re: Meta Data Corruption

Posted: Mon Feb 22, 2021 10:50 am
by xnview
This problem is supposed to be fixed in XnView MP 0.98.2. Please check and confirm the bug fix here.

Re: Meta Data Corruption

Posted: Thu Feb 25, 2021 3:25 pm
by brb
0.98.2 fixes the problem.

Thanks!