Page 1 of 2

IPTC/XMP Editor does not save metadata in PNG files

Posted: Mon Jul 14, 2014 11:51 pm
by Android the Andrew
I'm using XnViewMP v0.68, Libformat version 6.58, on Fedora Linux 20 x64.

I've checked in Help > About > Formats to make sure Portable Network Graphics files were supported, and it says there that XnViewMP can both read and write that format. However, it does not actually save save any metadata to PNG files for me.

Steps to reproduce:

1. I select a number of images, some JPG and some PNG.
2. I right-click to Edit IPTC/XMP.
3. I write metadata to various fields in the dialog.
4. I click "Save All".
5. Result: JPG metadata is saved, but PNG metadata is not.

Re: IPTC/XMP Editor does not save metadata in PNG files

Posted: Tue Jul 15, 2014 7:52 am
by m.Th.
I confirm this, with a correction: The keywords/categories are saved. However we use the Categories and Categories Sets pane in order to enter the keywords.

Re: IPTC/XMP Editor does not save metadata in PNG files

Posted: Wed Jul 16, 2014 2:22 pm
by xnview
you need to use XMP instead of IPTC only supported in PNG

Re: IPTC/XMP Editor does not save metadata in PNG files

Posted: Wed Jul 16, 2014 5:25 pm
by m.Th.
In Ctrl+I dialog I have on the Options tab the Mode drop down box set to IPTC-IIM, update or create XMP.

Shouldn't it work?

Re: IPTC/XMP Editor does not save metadata in PNG files

Posted: Thu Jul 17, 2014 1:47 pm
by xnview
m.Th. wrote:In Ctrl+I dialog I have on the Options tab the Mode drop down box set to IPTC-IIM, update or create XMP.

Shouldn't it work?
yes it works

Re: IPTC/XMP Editor does not save metadata in PNG files

Posted: Thu Jul 17, 2014 5:51 pm
by m.Th.
xnview wrote:
m.Th. wrote:In Ctrl+I dialog I have on the Options tab the Mode drop down box set to IPTC-IIM, update or create XMP.

Shouldn't it work?
yes it works
Not for me. Take the steps written by the OP.

Re: IPTC/XMP Editor does not save metadata in PNG files

Posted: Fri Jul 18, 2014 7:50 am
by xnview
m.Th. wrote: Not for me. Take the steps written by the OP.
i've tried, and it works correctly, i have XMP in PNG too

Re: IPTC/XMP Editor does not save metadata in PNG files

Posted: Sat Jul 26, 2014 11:09 pm
by Android the Andrew
I don't know what else to say, except that I followed steps which we apparently agree should work, and yet for me it does not work. I tried downloading XnViewMP again, but that didn't help either. Maybe it's a bug in the Linux release?

What I ended up having to do was use exiv2 instead. It's a terminal application, and I'd generally prefer something with a nice GUI like XnView, but with exiv2 you can create a file that stores all the commands and metadata you want to apply to an image. I had to read through the documentation a little about the different metadata formats, but once I figured things out once, it was pretty easy to use that command file as a template, changing any metadata as necessary when I applied it to other images. And it works, until we can figure out what's up with XnView.

Re: IPTC/XMP Editor does not save metadata in PNG files

Posted: Mon Jul 28, 2014 7:21 am
by m.Th.
Maybe it's a bug in the Linux release?
I'm on Windows.

Perhaps is better to send to Pierre a "non-working" PNG?

Re: IPTC/XMP Editor does not save metadata in PNG files

Posted: Mon Jul 28, 2014 8:18 am
by xnview
please send me a PNG file?

Re: IPTC/XMP Editor does not save metadata in PNG files

Posted: Mon Jul 28, 2014 9:17 pm
by Android the Andrew
Thanks for continuing to take a look at this with me.

There doesn't seem to be a way to upload images in the forum, and I didn't immediately see your email anywhere, Pierre, so I uploaded a test PNG I created to Flickr.

I created this new test PNG image file. I opened its directory in XnView. I right click test.png > Edit IPTC/XMP. I filled out all metadata fields with dummy text, so Headline should say "Headline," Byline should say "byline," etc. I clicked save. I examined the image metadata.

I should correct my original issue; apparently the metadata isn't entirely empty. I can see the metadata I entered in the bottom left "Info" pane in XnView. Normally, reopening the Edit IPTC/XMP dialog repopulates the fields with previously entered metadata; but for PNG files, if I go to Edit IPTC/XMP again, the fields show up in the dialog as empty. You will notice that Flickr detects some metadata in test.png, but not all of it -- for instance it does not detect the keywords (which should read "list, of, keywords") added using XnView. And the GNOME Image Viewer does not detect any metadata at all.

Re: IPTC/XMP Editor does not save metadata in PNG files

Posted: Tue Jul 29, 2014 7:11 am
by xnview
i've tried and XMP is changed correctly, could you send me a screenshot where you see some metadata?

Re: IPTC/XMP Editor does not save metadata in PNG files

Posted: Tue Jul 29, 2014 8:00 am
by cday
Android the Andrew wrote:There doesn't seem to be a way to upload images in the forum ...
Please see this post:

http://newsgroup.xnview.com/viewtopic.p ... 28#p120077

The max attachment file size is currently 1MB; file formats that can't be uploaded direcrly can be uploaded in a zip archive.

I intended to post an expanded attachment guide in FAQs but haven't done so yet, and realistically I doubt if many people who need help would find it there anyway! :wink:

Re: IPTC/XMP Editor does not save metadata in PNG files

Posted: Tue Jul 29, 2014 9:09 pm
by Android the Andrew
Please see this post:
Oh, hah. That's sort of a weird design choice on the part of the developers of the forum software: I think I would normally expect a file attachment menu to be up with the message composer, if anything, instead of down with the signature and BBCode options.
i've tried and XMP is changed correctly, could you send me a screenshot where you see some metadata?
I don't know what screenshots are going to prove, unless you just think I'm just not noticing the metadata.
Caption and Byline and such show up under the XMP tab of the "Info" pane in the bottom-left of XnView, but the corresponding fields are blank when you reopen the IPTC/XMP Editor dialog.
Caption and Byline and such show up under the XMP tab of the "Info" pane in the bottom-left of XnView, but the corresponding fields are blank when you reopen the IPTC/XMP Editor dialog.
In the "Info" pane, under the Exiftool tab, under the XMP heading, you can see Byline and Rights/Copyright information filled out, but the fields are all blank in the XnView IPTC/XMP Editor.
In the "Info" pane, under the Exiftool tab, under the XMP heading, you can see Byline and Rights/Copyright information filled out, but the fields are all blank in the XnView IPTC/XMP Editor.
GNOME Image Viewer does not detect or display any metadata either in the side panel or the Image Properties window. Normally the most important metadata (creator name, copyright statement, keywords...) appears in the side pane, and pretty much *all* metadata can normally be seen in the Image Properties window. There is none here.
GNOME Image Viewer does not detect or display any metadata either in the side panel or the Image Properties window. Normally the most important metadata (creator name, copyright statement, keywords...) appears in the side pane, and pretty much *all* metadata can normally be seen in the Image Properties window. There is none here.
And again, Flickr only detects some of the metadata.


While looking at this, I noticed in the Info pane, under the Exiftool tab, under the Exiftool heading, there's a warning:
Warning Bad Photoshop IRB resource "\x20Cap"

Re: IPTC/XMP Editor does not save metadata in PNG files

Posted: Tue Jul 29, 2014 11:00 pm
by XnTriq
Extracted from 14584184510_0e8e56a51d_o_d.png with TweakPNG:

Code: Select all

Chunk | Length | CRC      | Attributes                | Contents
——————+————————+——————————+———————————————————————————+—————————————————————————————————————————————————————————————————————————
IHDR  |     13 | e2c59e60 | critical                  | PNG image header: 111x111, 8 bits/sample, truecolor+alpha, noninterlaced
sBIT  |      4 | 7c086488 | ancillary, unsafe to copy | significant bits/sample: R:8,G:8,B:8,A:8
pHYs  |      9 | 3d6683c7 | ancillary, safe to copy   | pixel size = 787x787 pixels per meter (20.0x20.0 dpi)
tEXt  |     25 | 9bee3c1a | ancillary, safe to copy   | standard text: [Software]=[www.inkscape.org]
tEXt  |    496 | 9076c43d | ancillary, safe to copy   | nonstandard text: [Raw profile type iptc]=[…]
tEXt  |   3674 | 7fd4a41d | ancillary, safe to copy   | nonstandard text: [XML:com.adobe.xmp]=[…]
IDAT  |   3867 | 20a7ea0a | critical                  | PNG image data
IEND  |      0 | ae426082 | critical                  | end-of-image marker
tEXt chunk ([color=green]Raw profile type iptc[/color]) wrote:

Code: Select all

IPTC profile
     222
4e616d651c0250000642796c696e651c0255000c42796c696e65207469746c651c025a00
04436974791c025c00084c6f636174696f6e1c025f000553746174651c02640003555341
1c02650007436f756e7472791c0267001f4f726967696e616c207472616e736d69737369
6f6e207265666572656e63651c02690009486561646c696e652e1c026e00076372656469
74731c02730006536f757263651c02740009436f707972696768741c0278001a43617074
696f6e2c2063617074696f6e2c2063617074696f6e2e1c027a000e43617074696f6e2077
726974657200
tEXt chunk ([color=green]XML:com.adobe.xmp[/color]) wrote:

Code: Select all

<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 5.1.2">
   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
      <rdf:Description rdf:about=""
            xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/">
         <Iptc4xmpCore:CountryCode>USA</Iptc4xmpCore:CountryCode>
         <Iptc4xmpCore:Location>Location</Iptc4xmpCore:Location>
      </rdf:Description>
      <rdf:Description rdf:about=""
            xmlns:dc="http://purl.org/dc/elements/1.1/">
         <dc:creator>
            <rdf:Seq>
               <rdf:li>Byline</rdf:li>
            </rdf:Seq>
         </dc:creator>
         <dc:description>Caption, caption, caption.</dc:description>
         <dc:rights>Copyright</dc:rights>
         <dc:title>Object Name</dc:title>
      </rdf:Description>
      <rdf:Description rdf:about=""
            xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/">
         <photoshop:AuthorsPosition>Byline title</photoshop:AuthorsPosition>
         <photoshop:CaptionWriter>Caption writer</photoshop:CaptionWriter>
         <photoshop:City>City</photoshop:City>
         <photoshop:Country>Country</photoshop:Country>
         <photoshop:Credit>credits</photoshop:Credit>
         <photoshop:Headline>Headline.</photoshop:Headline>
         <photoshop:Source>Source</photoshop:Source>
         <photoshop:State>State</photoshop:State>
         <photoshop:TransmissionReference>Original transmission reference</photoshop:TransmissionReference>
      </rdf:Description>
   </rdf:RDF>
</x:xmpmeta>
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                           
<?xpacket end="w"?>
Android the Andrew wrote:While looking at this, I noticed in the Info pane, under the Exiftool tab, under the Exiftool heading, there's a warning:
Warning Bad Photoshop IRB resource "\x20Cap"
I hope this information is somehow helpful in identifying the problem.