Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

<Error>: ImageIO: PNG invalid PNG file: extra chunks between iDOT and IDAT

Tags:

xcode

ios

Just got this funny looking error in my swift project debugger.

There is probably an invalid name of an image somewhere, but I am not sure what extra chunks between iDOT and IDAT mean.

Do you have any idea what causes it?

like image 698
potato Avatar asked Oct 10 '15 09:10

potato


3 Answers

Product > Clean Build Folder (with pressed Option) fixed it for me

Keyboard shortcut - Shift+Option+Command+K

like image 113
Stefan S Avatar answered Sep 23 '22 21:09

Stefan S


This issue is completely random and happened to me too with a few images. Probably another Xcode bug.

  1. My image is called "[email protected]"
  2. I renamed it to "back2.png"
  3. Ran the project (the image will appear stretched)
  4. Changed it back to "[email protected]"
  5. Ran project
  6. FIXED?!

Good-luck hope it helps!

like image 20
brilliantairic Avatar answered Sep 21 '22 21:09

brilliantairic


In XCode 8, I cleaned the project (Product->Clean). Then quit XCode. Open it again. Then it works. I haven't changed name of the image. I guess it is just because XCode has some problem. Nothing is wrong with your code.

like image 26
flame3 Avatar answered Sep 21 '22 21:09

flame3