This queue is for tickets about the Image-Info CPAN distribution.

Report information
The Basics
Id:
93384
Status:
open
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
MATTHIAS [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)



Subject: inconsistent case of hashkey for (png) comments
checking the images from the testsuite with exiftool (from Image::ExifTool 8.15) i can see that two images have comments ------------>8--------------------- Image-Info-1.36# for i in img/*.png; do echo $i; exiftool $i | grep ^Comment; done img/interlace.png Comment : Created with The GIMP img/test.png img/ztxt.png Comment : some image comment. Image-Info-1.36# ------------>8--------------------- i would expect the comment to be available as documented, however for ztxt.png the hashkey seems to be 'comment' instead of 'Comment', which is undesirable and inconsistent. this particular behaviour might not be limited to png, but thats where we encountered it ------------>8--------------------- Image-Info-1.36# perl -Ilib -MImage::Info=image_info -E 'say image_info("img/interlace.png")->{Comment}' Created with The GIMP Image-Info-1.36# Image-Info-1.36# perl -Ilib -MImage::Info=image_info -E 'say image_info("img/ztxt.png")->{Comment}' Image-Info-1.36# perl -Ilib -MImage::Info=image_info -E 'say image_info("img/ztxt.png")->{comment}' some image comment Image-Info-1.36# ------------>8---------------------
On 2014-02-26 05:42:22, MATTHIAS wrote:
Show quoted text
> checking the images from the testsuite with exiftool (from > Image::ExifTool 8.15) i can see that two images have comments > > ------------>8--------------------- > Image-Info-1.36# for i in img/*.png; do echo $i; exiftool $i | grep > ^Comment; done > img/interlace.png > Comment : Created with The GIMP > img/test.png > img/ztxt.png > Comment : some image comment. > Image-Info-1.36# > ------------>8--------------------- > > i would expect the comment to be available as documented, however for > ztxt.png the hashkey seems to be 'comment' instead of 'Comment', which > is undesirable and inconsistent. this particular behaviour might not > be limited to png, but thats where we encountered it > > ------------>8--------------------- > Image-Info-1.36# perl -Ilib -MImage::Info=image_info -E 'say > image_info("img/interlace.png")->{Comment}' > Created with The GIMP > Image-Info-1.36# > Image-Info-1.36# perl -Ilib -MImage::Info=image_info -E 'say > image_info("img/ztxt.png")->{Comment}' > > Image-Info-1.36# perl -Ilib -MImage::Info=image_info -E 'say > image_info("img/ztxt.png")->{comment}' > some image comment > > Image-Info-1.36# > ------------>8---------------------
The documentation in http://www.w3.org/TR/PNG-Chunks.html says about tEXt chunks (which are semantically equivalent to zTXt chunks used in img/ztxt.png): "Keywords must be spelled exactly as registered, [...] In particular, keywords are considered case-sensitive.". So it seems that Image::Info is doing it right, and the encoding software (inkscape) did it wrong, at least it was not using the proposed keyword "Comment", but "comment". I'll check if current inkscape versions changed in this respect.
On 2014-12-19 02:25:01, SREZIC wrote:
Show quoted text
> On 2014-02-26 05:42:22, MATTHIAS wrote:
> > checking the images from the testsuite with exiftool (from > > Image::ExifTool 8.15) i can see that two images have comments > > > > ------------>8--------------------- > > Image-Info-1.36# for i in img/*.png; do echo $i; exiftool $i | grep > > ^Comment; done > > img/interlace.png > > Comment : Created with The GIMP > > img/test.png > > img/ztxt.png > > Comment : some image comment. > > Image-Info-1.36# > > ------------>8--------------------- > > > > i would expect the comment to be available as documented, however for > > ztxt.png the hashkey seems to be 'comment' instead of 'Comment', > > which > > is undesirable and inconsistent. this particular behaviour might not > > be limited to png, but thats where we encountered it > > > > ------------>8--------------------- > > Image-Info-1.36# perl -Ilib -MImage::Info=image_info -E 'say > > image_info("img/interlace.png")->{Comment}' > > Created with The GIMP > > Image-Info-1.36# > > Image-Info-1.36# perl -Ilib -MImage::Info=image_info -E 'say > > image_info("img/ztxt.png")->{Comment}' > > > > Image-Info-1.36# perl -Ilib -MImage::Info=image_info -E 'say > > image_info("img/ztxt.png")->{comment}' > > some image comment > > > > Image-Info-1.36# > > ------------>8---------------------
> > The documentation in http://www.w3.org/TR/PNG-Chunks.html says about > tEXt chunks (which are semantically equivalent to zTXt chunks used in > img/ztxt.png): "Keywords must be spelled exactly as registered, [...] > In particular, keywords are considered case-sensitive.". So it seems > that Image::Info is doing it right, and the encoding software > (inkscape) did it wrong, at least it was not using the proposed > keyword "Comment", but "comment". I'll check if current inkscape > versions changed in this respect.
Image::ExifTool is explicitly doing a ucfirst() here: https://metacpan.org/source/EXIFTOOL/Image-ExifTool-9.76/lib/Image/ExifTool/PNG.pm#L588


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.