Bug #630

CRC error in chunk zTXt

Added by etjeuotc sharklasers over 8 years ago. Updated over 8 years ago.

Status:ClosedStart date:03 May 2009
Priority:HighDue date:
Assignee:-% Done:

100%

Category:image format
Target version:0.18.2

Description

If a metadata is written in a PNG image using exiv2 (I've tested 0.18 and 0.18.1) and that image is checked using pngcheck (2.0.0), a tipical result is: "CRC error in chunk zTXt (actual 2953764d, should be 47edf1a1)".

wo_metadata.png - a without-metadata gimp-made PNG (306 Bytes) etjeuotc sharklasers, 03 May 2009 01:36

w_metadata.png - the same PNG as above but with: exiv2 -M"set Exif.Photo.UserComment charset=Ascii New Exif comment" w_metadata.png (673 Bytes) etjeuotc sharklasers, 03 May 2009 01:36

pngchunk.zip (6.06 KB) Andreas Huggel, 08 Jun 2009 20:59


Related issues

Related to Exiv2 - Bug #638: Valgrind reports errors when writing to PNG image Closed 11 Jun 2009

Associated revisions

Revision 1816
Added by Andreas Huggel over 8 years ago

#630: Fixed CRC error in chunk zTXt (Jochen Schug).

History

#1 Updated by Andreas Huggel over 8 years ago

Originally reported as digiKam bug 191288

#2 Updated by Andreas Huggel over 8 years ago

  • File pngchunk.zip added
  • Priority changed from Normal to High

Attached bugfix from Jochen Schug: "Important as IE7 and IE8 don't accept images with wrong CRC."

#3 Updated by Andreas Huggel over 8 years ago

  • Target version set to 0.18.2

#4 Updated by Andreas Huggel over 8 years ago

  • Category set to image format
  • Status changed from New to Resolved
  • % Done changed from 0 to 100

The CRC issue seems to be fixed with the patch from Jochen. Will open another bug for the remaining issues.

#5 Updated by Andreas Huggel over 8 years ago

Andreas Huggel wrote:

Will open another bug for the remaining issues.

#638

#6 Updated by Andreas Huggel over 8 years ago

gegio 0, can you please test with r1816 and confirm if the fix is ok?

#7 Updated by Gilles Caulier over 8 years ago

Andreas Huggel wrote:

gegio 0, can you please test with r1816 and confirm if the fix is ok?

Andreas,

Just played with last Exiv2 code and digiKam : I have save a JPEG image to PNG with editor. Reloading PNG in digiKam give this error from the console:

digikam(15542)/digikam (core) Digikam::DImg::load: "/mnt/data/photos/Albums/Test Pictures/METADATA/Vista/Dock.png" : PNG file identified
libpng warning: iTXt: CRC error

Image has Exif, IPTC, and XMP. Exif and Iptc are stored to zTXt chunk. So it's fixed for that.

XMP is stored to iTXt following Adobe paper. This one is not yet fixed...

Gilles Caulier

#8 Updated by Andreas Huggel over 8 years ago

Gilles, thanks for testing. Can you elaborate:

digikam(15542)/digikam (core) Digikam::DImg::load: "/mnt/data/photos/Albums/Test Pictures/METADATA/Vista/Dock.png" : PNG file identified
libpng warning: iTXt: CRC error

Image has Exif, IPTC, and XMP. Exif and Iptc are stored to zTXt chunk. So it's fixed for that.

The CRC error should not be there anymore. Why do you say it's fixed?

XMP is stored to iTXt following Adobe paper. This one is not yet fixed...

Is this a different problem? If so, can you please open an issue and explain a bit more what is needed? I'm about to check-in a fix for #638, maybe that's related somehow. Hold on a moment...

Andreas

#9 Updated by Andreas Huggel over 8 years ago

Andreas Huggel wrote:

Gilles, thanks for testing. Can you elaborate:

digikam(15542)/digikam (core) Digikam::DImg::load: "/mnt/data/photos/Albums/Test Pictures/METADATA/Vista/Dock.png" : PNG file identified
libpng warning: iTXt: CRC error

Image has Exif, IPTC, and XMP. Exif and Iptc are stored to zTXt chunk. So it's fixed for that.

The CRC error should not be there anymore. Why do you say it's fixed?

XMP is stored to iTXt following Adobe paper. This one is not yet fixed...

Is this a different problem? If so, can you please open an issue and explain a bit more what is needed? I'm about to check-in a fix for #638, maybe that's related somehow. Hold on a moment...

Andreas

I get it in the meantime. All CRC warnings should be fixed with r1818

#10 Updated by Andreas Huggel over 8 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF

Redmine Appliance - Powered by TurnKey Linux