Re-saving PNG deletes EXIF

*** Please try to reproduce your bug and confirm the bug fix. ***

Moderators: helmut, XnTriq, xnview, Dreamer

Post Reply
esv
Posts: 43
Joined: Fri Sep 16, 2022 1:04 pm

Re-saving PNG deletes EXIF

Post 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)
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Re-saving PNG deletes EXIF

Post by xnview »

EXIF is not supported by PNG
Pierre.
esv
Posts: 43
Joined: Fri Sep 16, 2022 1:04 pm

Re: Re-saving PNG deletes EXIF

Post by esv »

Well, it is supported by the PNG:
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Re-saving PNG deletes EXIF

Post by xnview »

yes right, i didn't know that a special chunk was added. Could you send me a PNG file with EXIF data?
Pierre.
esv
Posts: 43
Joined: Fri Sep 16, 2022 1:04 pm

Re: Re-saving PNG deletes EXIF

Post by esv »

Sure thing, the attached file is a tiny screenshot of a white screen area, it does show IFD0 and Exif IFD fields
Attachments
PNG with EXIF
PNG with EXIF
screen.png (4.17 KiB) Viewed 2760 times
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Re-saving PNG deletes EXIF

Post by xnview »

See issue for current status and some details.
Pierre.
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Re-saving PNG deletes EXIF

Post by xnview »

This problem is supposed to be fixed in XnView MP 1.4.3. Please check and confirm the bug fix here.
Pierre.
esv
Posts: 43
Joined: Fri Sep 16, 2022 1:04 pm

Re: Re-saving PNG deletes EXIF

Post 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)
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Re-saving PNG deletes EXIF

Post by xnview »

could you send me the file?
Pierre.
esv
Posts: 43
Joined: Fri Sep 16, 2022 1:04 pm

Re: Re-saving PNG deletes EXIF

Post by esv »

Sure
xn1.png is the original screenshot
xn2_edit.png is the same file cropped in XnViewMP with the warning
Attachments
xn1.png
xn1.png (3.91 KiB) Viewed 2115 times
xn2_edit.png
xn2_edit.png (3.97 KiB) Viewed 2115 times
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Re-saving PNG deletes EXIF

Post by xnview »

it's only a warning, LIBPNG writes at the end the EXIF chunk...
Pierre.
Post Reply