IPad: PNG Crush Error

I am trying to connect my iPad project to the latest iPad 2. I installed the iOS 4.3 SDK with Xcode 4.0. When I try to create my project, I get the following error. I do not know why I am getting this error. Can someone help me resolve this build error?

When reading / Users / username / Desktop / iPAD / MyProject / trunk / Resourses / images / top _bar.png pngcrush, a libpng error was detected: Not a PNG file.

Could not find file: /Users/username/Library/Developer/Xcode/DerivedData/Project-fmhveawksgdtnraclfizuhrekmzi/Build/Products/Debug-iphoneos/MyApp-Upgraded.app/top_bar.png

+73
ipad ipad-2
Mar 22 2018-11-11T00:
source share
15 answers

Have you checked if the file Users/kavapanga/Desktop/iPAD/ALN II 3 latest 2/trunk/Resourses/images/CS_logo_for_top_bar.png ? Also check if this is an infact PNG file. Right-click the file and run the Get Info command to check if the file has any other extension and is marked as hide extension. If you are not sure about the file format, open the file and save it as a PNG file, it should work most of the time.

+60
Mar 22
source share

I had the same problem, but that was not due to a damaged png: it was because two PNG files had the same file name in different directories of my source tree. What was strange was that the errors (I had 4 files that had “twins”) were not identical from one assembly to another. In one pass, I had errors in all files, and on the other, only on some of them.

+89
May 26 '12 at 1:47 p.m.
source share

I had the same problem. How to fix it: open the image using preview → File> Export> Change the format to PNG, and you're done!

+51
Apr 12 2018-12-12T00:
source share

I got this error when I moved the images in the project folder to the "Images" folder.

It turns out that my “Copy Resources” build phase contains steps both for copying files from their new, correct folder, and from the previous folder in which they were saved. Removing obsolete build steps fixed the bugs.

+10
Jun 22 2018-12-12T00:
source share

No problem with image or Xcode. The problem that this image creates from Photoshop is that this image is interlaced or non-interlaced. By saving the image in Photoshop, you will get one option for it.

See this link for more information:

Build an application with Xcode 4 - it always shows some error about PNG image

not interlaced:. You must use an image that does not alternate. This is the original png image.

interlaced: This option is suitable for an image that is downloaded from the Internet. Specifically, this is used when you need to reduce image loading time. This is an internal implementation of this option, it will create a .png file, but with lower clarity and lower resolution, like a regular jpeg image. That is why such images have the property of a jpeg image.

Hope this helps all of you.

Enjoy the coding :)

+9
Apr 27 '12 at 4:28
source share

Another reason pngcrush considers PNG files to not be PNG files is if you accidentally export them with layers. If you check the file in Finder, look at the Additional Information area (Dimensions, Color Space, etc.) For an item called Layers

He might say something like:

Layer 68, Title Banner, Group 26

This happens when designers sometimes save as PNG, rather than export for web / mobile. And it completely destroys libpng (and therefore pngcrush).

Fix - Export PNGs correctly or open PNG yourself and re-export it as a "flat" PNG.

+5
Feb 12 '13 at 20:09
source share

This may be due to an incompatible PNG file format. You will need a “Color Profile” for your png file to work in Xcode.

First of all, check the information for your file.

enter image description here

As long as it is a valid PNG file, it is NOT a format that Xcode can accept. You will need the following PNG format:

enter image description here

Convert a PNG file to a format that Xcode can accept. You can use Preview to export the file.

+4
Nov 22 '15 at 11:29
source share

This problem also has. PNG existed and was not damaged.

Solved it:

  • R-click on the image in xcode, select "Delete"
  • Delete link only (do not delete file)
  • Drag n 'back to xcode (in place), making sure you select the correct targets
+3
Mar 13 '13 at 20:01
source share

I had this problem and it turned out that the problem is related to png. I redid it and worked great.

+2
Dec 24 '11 at 2:07 a.m.
source share

I had the same problem. Although the file extension may be png, the file may still be something else. And “get info” shows what a file extension is, I think. Open the file in preview mode and go to tools -> show inspector -> File tab. Here you can see the actual file type.

+2
Mar 07 '12 at 10:23
source share

I had this error, and in fact it was completely unrelated to png, which was an error. The actual problem was that I had two files with the same name in my project (I had drag'n'dropped a newer version of a third-party class, assuming it would replace the old version).

I deleted the duplicate file link and resolved the build errors.

+2
Jan 29 '14 at 17:22
source share

I get the same error when I tried to copy the project folder and start the project. The project in the source folder did not have this problem.

Deleting a copy and creating a new copy of the folder solved my problem.

+1
May 15 '13 at 12:17
source share

Problem resolved

I have the same problem, just in development, but today I found that there are two solutions and their capabilities, this one

Problem solved # 1: if you create or your designer creates a design that they saved pnd from Adobe Illustrator, then he had a problem, if you yourself create a copy of the entire AI image in Photoshop or create its designer, just tell them to import the illustrator format into photoshop and send pnd.

Problem solved # 2: select the image, right-click the image-> get information and make sure that it is in the correct .png format or not if it is not just editing the .png extension.

Just enjoy it.

0
Dec 01 '12 at 23:32
source share

Mistake:

When reading / volumes / Mac OS / RDC / Workpot / RestApp / RestApp / default1024_768.png pngcrush caught Error libpng: not a PNG file.

Decision:

  • I opened the file "default1024_768" in PaintBrush and saved the PNG file with the same name.
  • Replaced the Icon file in the Xcode project → Clean → Assembly.

That all his work is like a charm

Hope this helps someone.

0
Jan 09 '15 at 6:05
source share

I have this error quite often. if you are 100% sure that your png is correct, just recompile the project, if it doesn’t work, recompile it again and again, and sometimes it will start to work ;-) that there is an error in Xcode that has been there for a long time (with Xcode3).

-3
May 17 '13 at 15:53
source share



All Articles