1

I was copying a bunch of png files to a separate folder, which I was going to gzip and then move to a different system. I was able to do that, but all those png files that I transferred are giving a crc error in chunk idat. All these images are actually screenshots. I am able to take new screenshots but all of those which I had transferred have a png error in them. I am facing this issue on both the origin and the destination where I transferred them.

According to this answer : Fatal error reading PNG image file: Not a PNG file
I have tried reinstalling libpng12-dev and libpng12-0, but it does not work.

Here is the detailed output of a png file that I am unable to open:

$ pngcheck -v myfile.png
File: myfile.png (80028 bytes)
  chunk IHDR at offset 0x0000c, length 13
    1090 x 306 image, 24-bit RGB, non-interlaced
  chunk sBIT at offset 0x00025, length 3
    red = 8 = 0x08, green = 8 = 0x08, blue = 8 = 0x08
  chunk tEXt at offset 0x00034, length 25, keyword: Software
  chunk IDAT at offset 0x00059, length 8192
    zlib: deflated, 32K window, default compression
  CRC error in chunk IDAT (computed 550cf20e, expected 24c50000)
ERRORS DETECTED in myfile.png

I have also tried opening these files with Google-Chrome, I can see only 20% of the image, rest of the image is clipped with a green line.

Is there a way I can solve this ?

OS_version : Ubuntu 16.04

  • It happened to me when I pulled out a USB stick too soon after saving a screenshot. It seems to have written part of it and the rest is random data that happened to be in those sectors on the drive (in my case lots of plaintext from log files) – Mark Jeronimus Dec 09 '20 at 14:36

1 Answers1

1

I had the same issue.

pngcheck -v orang.png
File: orang.png (18315 bytes)
  chunk IHDR at offset 0x0000c, length 13
    128 x 128 image, 24-bit RGB, non-interlaced
  chunk IDAT at offset 0x00025, length 8192
    zlib: deflated, 32K window, default compression
  CRC error in chunk IDAT (computed 374df55a, expected 907a67be)
ERRORS DETECTED in orang.png

I actually went into the file, using a hex editor (I prefer 010 Editor) and noticed that there were a whole bunch of 20's in the file. My file was for a CTF challenge and it turned out that there was manual corruption that had happened and all I had to do to fix it was delete the added information.

So my suggestion to you would be to look at the file through and see if there is anything suspicious. Unfortunately, I couldn't find anything that stated what to do with the information given but I did solve my issue that gave the same error.

Mac
  • 11
  • 1