Page 1 of 1

Re-saving PNG deletes EXIF

Posted: Sat Dec 03, 2022 6:20 pm
by esv
In Setting→General→Formats→Write I have all 4 metadata checkmarks ticked/enabled (as far as I understand, this is a common section for all formats, so should also work for PNG)
  • Keep EXIF
  • Keep IPTC
  • Keep XMP
  • Keep ICC profile
However, when I resave a scanned PNG file (via export or cropping and saving or saving as), the EXIF section of the file is gone

XnView: MP 1.3.1 64 bit
OS: macOS 10.15.7 64bit (though same thing happens on Windows 10)

Re: Re-saving PNG deletes EXIF

Posted: Sun Dec 04, 2022 2:31 pm
by xnview
EXIF is not supported by PNG

Re: Re-saving PNG deletes EXIF

Posted: Sun Dec 04, 2022 4:09 pm
by esv
Well, it is supported by the PNG:

Re: Re-saving PNG deletes EXIF

Posted: Mon Dec 05, 2022 7:58 am
by xnview
yes right, i didn't know that a special chunk was added. Could you send me a PNG file with EXIF data?

Re: Re-saving PNG deletes EXIF

Posted: Mon Dec 05, 2022 1:47 pm
by esv
Sure thing, the attached file is a tiny screenshot of a white screen area, it does show IFD0 and Exif IFD fields

Re: Re-saving PNG deletes EXIF

Posted: Sun Feb 12, 2023 12:47 pm
by xnview
See issue for current status and some details.

Re: Re-saving PNG deletes EXIF

Posted: Mon Feb 27, 2023 9:57 am
by xnview
This problem is supposed to be fixed in XnView MP 1.4.3. Please check and confirm the bug fix here.

Re: Re-saving PNG deletes EXIF

Posted: Mon Feb 27, 2023 5:35 pm
by esv
Upd: I've learned that the Apple chunk is supposed to disappear per PNG spec, but that still doesn't explain the warning

Just converted a screenshot in the new version and noticed that there is a warning from exiftool, though not sure what it is
before

Code: Select all

Apple Data Offsets              : (Binary data 28 bytes, use -b option to extract)
after

Code: Select all

No field 'Apple Data Offsets' (as it should be)
Warning                         : [minor] Text/EXIF chunk(s) found after PNG IDAT (may be ignored by some readers)

Re: Re-saving PNG deletes EXIF

Posted: Wed Mar 01, 2023 3:24 pm
by xnview
could you send me the file?

Re: Re-saving PNG deletes EXIF

Posted: Wed Mar 01, 2023 3:38 pm
by esv
Sure
xn1.png is the original screenshot
xn2_edit.png is the same file cropped in XnViewMP with the warning

Re: Re-saving PNG deletes EXIF

Posted: Wed Mar 01, 2023 4:16 pm
by xnview
it's only a warning, LIBPNG writes at the end the EXIF chunk...