Invalid PNG Image file: iDOT doesn't point to valid IDAT chunk

╄→гoц情女王★ 提交于 2019-12-03 11:04:01

Had the same problem. Solution: use "color sync utility" which is a standard program, you can load from launchpad. Open the png file and save it with the utility.

'cleaning' the project (xcode menu path : product -> clean) solved this exact issue for me.

Resaving the .png with a new name did not.

Image did appear in the simulator but not on the test device (ipod touch 5th gen.)

Very large image 4000 x 4000

Strangely, I had the exact same issue just about an hour ago. I didn't find a particular reason for why it was failing, but I think I was able to "fix" the image to make it display properly and not throw an error.

I just opened it in Preview and exported a new PNG file from the source. Once I replaced the bad image in my project file with the newly created one, I cleaned, compiled and it worked as expected.

Hope it's as easy as that for you...

You may want to check you don't have another file with the same name in another directory. That is what caused this error for me .. (duplicate Default.png)

I had the same problem with my app.It turn out that the images that the user was uploading to my server and edited with php +imagemagik where striped out.I was using the following command to edit the uploaded image:

convert $uploadfile -resize 300x300 -quality 30 -strip $uploadfile

When i removed the -strip parameter the error was disappeared !

Same problem here.
1 - Close XCode;
2 - Open the image in Photoshop;
3 - Re-save ( replace the same image ) with 80% quality;
4 - Open XCode, clean it CMD + SHIFT + K;
5 - Build it in your device again;

Very simple and work for me.
And for you ?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!