Pngcrush libpng error: Not enough image

6.8k views Asked by At

This is the error Message in Xcode: While checking alphas in /Path/[email protected] pngcrush caught libpng error: Not enough image dCommand /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/copypng emitted errors but did not return a nonzero exit code to indicate failure

But the Application is running fine even with this error. Even the image is loading on the iPhone 4 running iOS 6.0

I tried removing the image and adding it again. Also tried saving it into png from Preview.

5

There are 5 answers

0
mavericks On

Im my case because of redundancy of images it was happening so I deleted all those images which ever was causing error.And Error was gone...!

0
Pétur Ingi Egilsson On

libpng is an open source project, the source code is available here: Sourceforge.net

I searched the source code for the error you mentioned, Not enough image dCommand. The closest match i could find was Not enough image data, from pngrutil.c

A quick google of Not enough image data gives this solution from stackoverflow.com

Found it!!

You have to save your PNG files as NOT INTERLACED. Try to open the file in photoshop (or similar), save as, and select "Not interlaced".

It is working in my case

hope this helps

0
NightFury On

One cause of this error is when you manually change extension of .jpg image as .png. It normally works fine, But when you will try to run on device, such errors are raised. So re-save your image in png format (non interlaced).

1
Mohamed Saleh On

Most of the time it would be a problem on the image it self and you will need to open it in preview and reexport it again as PNG.

Better and a fast solution use this App called "imageoptim" it will compress the images and solve PNGcrushs http://imageoptim.com/xcode.html

0
fpauer On

That solved my problem. In my case, it was repeated png files name.

Not a PNG filCommand copypng emitted errors but did not return a nonzero exit code to indicate failure