After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 567466 - PNG comment not found if more than 1 tEXt chunks
PNG comment not found if more than 1 tEXt chunks
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
2.6.6
Other All
: Normal minor
: 2.6
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2009-01-12 08:38 UTC by Frank
Modified: 2009-07-16 20:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Sample images for bug demonstration (2.37 KB, application/octet-stream)
2009-01-15 08:13 UTC, Frank
  Details
proposed patch (453 bytes, patch)
2009-07-15 15:29 UTC, Massimo
committed Details | Review

Description Frank 2009-01-12 08:38:24 UTC
In a PNG image a comment (chunk of type "tEXt" with keyword "Comment") is not found in image properties, if the image contains more than one tEXt chunks with different keywords.
Comment 1 Michael Schumacher 2009-01-12 10:30:54 UTC
It looks like there is code in the PNG plug-in to handle this, though - http://svn.gnome.org/viewvc/gimp/branches/gimp-2-6/plug-ins/common/file-png.c?view=markup, line 1031ff.
Comment 2 Michael Schumacher 2009-01-13 09:37:30 UTC
Could you attach a sample image, please?
Comment 3 Frank 2009-01-15 08:13:03 UTC
Created attachment 126489 [details]
Sample images for bug demonstration
Comment 4 Frank 2009-01-15 08:21:08 UTC
If a work on this bug is done it would be nice to complete it with evaluation of all keywords in http://www.w3.org/TR/PNG/#11keywords and user supplied keywords to.

All read keywords should be written too, else a fully metainfo tagged image is destroyed after editing, because metainfo is important.

A change in the edit box should be stored always, not only via "Save as".
Comment 5 Michael Schumacher 2009-01-15 09:24:01 UTC
Maybe you want to try this? Shouldn't be too complex to add this to the PNG plug-in.
Comment 6 Massimo 2009-07-15 15:29:52 UTC
Created attachment 138452 [details] [review]
proposed patch

This one is an oversight: only the first tEXt chunk
of a png is considered, though repeatedly, when 
looking for the Comment.

Patch against file 'plug-ins/common/file-png.c'
of the release 2.6.6.
Comment 7 Michael Schumacher 2009-07-15 15:53:38 UTC
Is there anything we can do to help you switch to git?
Comment 8 Michael Schumacher 2009-07-15 16:03:09 UTC
IMO we should apply this fix to 2.6 as well. 

Supporting all keywords is a job for the meta-data plug-in and should be handled in a new report (preferably by adding patches at the same time as opening it :), but we might want to discuss this on gimp-developer first.
Comment 9 Sven Neumann 2009-07-16 20:31:00 UTC
commit 65c21b6bc3eb1455cbd7f890b568d3504f7250f4
Author: Massimo Valentini <sixtysix@inwind.it>
Date:   Thu Jul 16 22:24:59 2009 +0200

    Bug 567466 – PNG comment not found if more than 1 tEXt chunks
    
    Fix an oversight: only the first tEXt chunk of a PNG was considered,
    though repeatedly, when looking for the comment.

 plug-ins/common/file-png.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)