brendan-duncan / image

Dart Image Library for opening, manipulating, and saving various different image file formats.
MIT License
1.18k stars 268 forks source link

ImageException: Invalid IDAT checksum #42

Closed davenotik closed 8 years ago

davenotik commented 8 years ago

I got this exception at one point. I restarted my Dart server and tried again, and it worked, but figured I'd bring it up as it may be something I shouldn't ignore.

ImageException: Invalid IDAT checksum

#0      PngDecoder.decodeFrame (package:image/src/formats/png_decoder.dart:215:11)
#1      PngDecoder.decodeImage (package:image/src/formats/png_decoder.dart:304:12)
#2      decodeImage (package:image/src/formats/formats.dart:60:18)
#3      ImageUtil.resize.<resize_async_body> (package:woven/src/server/util/image_util.dart:19:19)
...

Thank you for a great lib! I had been using ImageMagick via Dart for a long time. Recently I switched to your lib and I was so happy to kill the IM dependency.

brendan-duncan commented 8 years ago

It would get that error if it read the image file from disk and the image data block appeared to be corrupted due to the reported checksum being different than the calculated checksum. If it was a fluke, then it could just have been a random disk read error.

Thanks!

brendan-duncan commented 8 years ago

I'll go ahead and close this issue, but if it continues to be an issue, I can look into it more.

davenotik commented 8 years ago

Thank you Brendan! So far, haven't encountered it again.