From: Glenn Randers-P. <gl...@gm...> - 2012-06-19 17:15:31
|
I received a copy of the PNG "ringo4.png" and pngcrush -n -v sees the added zTXt and iTXt chunks. pngcrush was built with libpng-1.5.10 Glenn On Tue, Jun 19, 2012 at 12:21 PM, Andreas Kleinert <And...@gm...> wrote: > Using a command line like the following, ExifTool (here: tried v7.77 and > v8.95, i.a. latest) is able to transfer meta data from JFIF (here: Exif, > Iptc and XMP chunks) to PNG using a command line like the following: > > exiftool -tagsfromfile some.jfif some-existing.png > > The PNG file gets modified (after being backed up) and at its very end > some (here: 3) text chunks are added, which carry that additional meta > data. These chunks are (here: 3 in that order): > > zTXT (Exif data) > zTXT (Iptc data) > iTXT (XMP data) The file actually contains zTXt and iTXt which is correct. > > ...and then IEND follows. > > Now the issue. If I try to read such a file into my own reader(*), > png_get_text() never reports back any of these text chunks. > > If I, however, use my own writer(*) - which uses png_set_text() - to put > these chunks initially (instead of ExifTool) they are placed earlier > into the file and I don't have any issues later when trying to read them > back again - png_get_text() finds them and I can handle them. Is your code looking for them in read_ptr or in end_ptr, if you have separate png_struct pointers for before and after IDAT? > > So my conclusion is that my code is basically correct and that libpng > 1.5.10 either considers the ExifTool-created file malformed (after some > point) or stops parsing for *txt chunks at some point for some (other) > reason. > > Question: > - is there any known issue in libpng 1.5.x with "late positioned" > text chunks? > - is there any known issue in ExifTool in adding these wrongly? > > I thought I'd post that here first, as the PNG file does not seem > corrupted and as ExifTool itself seems to be able to read back > data from both kinds of output files. > > > (*) SView5, just for the record > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > png-mng-implement mailing list > png...@li... > https://lists.sourceforge.net/lists/listinfo/png-mng-implement |