I have some HTML content pages in an app and I\'m using a UIWebView to display them. Some of these pages have a PNG image in them that is generating the following message in th
'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
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 !
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)
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 ?
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.
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...