ios PNG Crush error (PNG图片错误)

简介:

我是这么解决的:

I had the same problem. How to fix : Open up image with Preview -> File > Export > Format change to PNG and you are done

其他被采纳的方法:

12 Answers

up vote 41 down vote accepted

Did you check whether the file Users/kavapanga/Desktop/iPAD/ALN II 3 latest 2/trunk/Resourses/images/CS_logo_for_top_bar.png exists? Also check if it is infact a PNG file. Right click on the file and do a Get Info to check if the file has any other extension and is marked as hide extension. If you are not sure of the format of the file, opening the file and save it as a PNG file again should work ,most of the time.

share | edit | flag
 
   
   
Hi Krishna, Yes, i see the file is available with the .png format. – Getsy Mar 22 '11 at 6:50
1  
   
Could you please try saving it as a PNG once again? – Krishna Mar 22 '11 at 6:52
   
   
Hi Krishna, As you said, i saved again as .PNG format. It is not giving build error now. But, when i try to install on my iPad 2 through Xcode 4(all the settings are done), it shows "Finished Running MyApp-iPad" , but i'm not seeing the app installed on my iPad. What could be reason? – Getsy Mar 22 '11 at 6:54
1  
   
Would you mind accepting this answer? – Krishna Mar 22 '11 at 7:30
1  
   
I think it just got upvoted but not accepted. Not sure why. Did you click on the tick mark against the answer? – Krishna Mar 22 '11 at 7:38
show 10 more comments

I had the same problem, but it wasn't because of a corrupted png : it was because two PNG files had the same filename in different directories of my source tree. What was peculiar was that the errors (I had 4 files which had "twins") were not identical from one build to another. On one run I had errors on all files, on the other only on some of them.

share | edit | flag
 
2  
   
This happened to me. I opened a project I hadn't been using for a couple of days, and after two or three builds, this. Weird... – NicolasMiari Jun 18 '12 at 19:49
   
   
Possibly both versions were added to your copy-files build phase; at least that was the problem for me. – Pascal Apr 13 at 20:26
add comment (requires 50 reputation)

I had the same problem. How to fix : Open up image with Preview -> File > Export > Format change to PNG and you are done !!

share | edit | flag
 
   
   
thak you :),great help in the hour of need – Yadnesh Jul 6 '12 at 14:19
   
   
this ans have done my work....+1 – hckr Nov 30 '12 at 11:23
   
   
wow, by far the easiest solution – Frank Fu Mar 10 at 10:02
   
   
One of the Best Answer! Banging my head whole day! – Developer Mar 28 at 20:49
   
   
This was a great find. Artist had saved as psd but with png extension – Codezy Jul 24 at 16:08
add comment (requires 50 reputation)

I got this error when I moved images around in the project's folder, to an "Images" folder.

Turns out my "Copy Resources" build phase contained the steps both to copy the files from their new, correct folder - and from the previous folder where they were stored. Removing the outdated build steps fixed the errors.

share | edit | flag
 
欢迎加群互相学习,共同进步。QQ群:iOS: 58099570 | Android: 572064792 | Nodejs:329118122 做人要厚道,转载请注明出处!




















本文转自张昺华-sky博客园博客,原文链接:http://www.cnblogs.com/sunshine-anycall/p/3272858.html ,如需转载请自行联系原作者


相关文章
|
1月前
|
JSON JavaScript 安全
iOS应用程序数据保护:如何保护iOS应用程序中的图片、资源和敏感数据
iOS应用程序数据保护:如何保护iOS应用程序中的图片、资源和敏感数据
23 1
|
3天前
|
存储 缓存 安全
基于iOS平台的高效图片缓存策略实现
【4月更文挑战第22天】 在移动应用开发中,图片资源的加载与缓存是影响用户体验的重要因素之一。尤其对于iOS平台,由于设备存储空间的限制以及用户对流畅性的高要求,设计一种合理的图片缓存策略显得尤为关键。本文将探讨在iOS环境下,如何通过使用先进的图片缓存技术,包括内存缓存、磁盘缓存以及网络请求的优化,来提高应用的性能和响应速度。我们将重点分析多级缓存机制的设计与实现,并对可能出现的问题及其解决方案进行讨论。
|
3天前
|
存储 缓存 算法
实现iOS平台的高效图片缓存策略
【4月更文挑战第22天】在移动应用开发中,图片资源的处理是影响用户体验的重要因素之一。特别是对于图像资源密集型的iOS应用,如何有效地缓存图片以减少内存占用和提升加载速度,是开发者们面临的关键挑战。本文将探讨一种针对iOS平台的图片缓存策略,该策略通过结合内存缓存与磁盘缓存的机制,并采用先进的图片解码和异步加载技术,旨在实现快速加载的同时,保持应用的内存效率。
|
16天前
|
存储 缓存 iOS开发
基于iOS的高效图片缓存策略实现
【4月更文挑战第9天】在移动应用开发中,图片资源的加载与缓存是影响用户体验的重要因素之一。特别是对于iOS平台,合理设计图片缓存策略不仅能够提升用户浏览图片时的流畅度,还能有效降低应用程序的内存压力。本文将介绍一种针对iOS环境优化的图片缓存技术,该技术通过多级缓存机制和内存管理策略,实现了图片快速加载与低内存消耗的目标。我们将从系统架构、关键技术细节以及性能评估等方面展开讨论,为开发者提供一套实用的图片缓存解决方案。
16 0
|
21天前
|
存储 缓存 iOS开发
实现iOS平台的高效图片缓存策略
【4月更文挑战第4天】在移动应用开发中,图片资源的加载与缓存是影响用户体验的关键因素之一。尤其对于iOS平台,由于设备存储和内存资源的限制,设计一个高效的图片缓存机制尤为重要。本文将深入探讨在iOS环境下,如何通过技术手段实现图片的高效加载与缓存,包括内存缓存、磁盘缓存以及网络层面的优化,旨在为用户提供流畅且稳定的图片浏览体验。
|
3月前
|
JSON JavaScript 安全
iOS 应用程序数据保护:如何保护 iOS 应用程序中的图片、资源和敏感数据
iOS 应用程序数据保护:如何保护 iOS 应用程序中的图片、资源和敏感数据
|
7月前
|
缓存 iOS开发
iOS LaunchScreen.storyboard 启动页设置图片不显示
iOS LaunchScreen.storyboard 启动页设置图片不显示
138 0
|
1月前
|
API 数据安全/隐私保护 iOS开发
利用uni-app 开发的iOS app 发布到App Store全流程
利用uni-app 开发的iOS app 发布到App Store全流程
85 3
|
3月前
|
存储 iOS开发
iOS 开发,如何进行应用的本地化(Localization)?
iOS 开发,如何进行应用的本地化(Localization)?
122 2
|
3月前
|
存储 数据建模 数据库
IOS开发数据存储:什么是 UserDefaults?有哪些替代方案?
IOS开发数据存储:什么是 UserDefaults?有哪些替代方案?
39 0