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 ,如需转载请自行联系原作者


相关文章
|
9月前
|
iOS开发 开发者
uniapp开发ios打包Error code = -5000 Error message: Error: certificate file(p12) import failed!报错问题如何解决
uniapp开发ios打包Error code = -5000 Error message: Error: certificate file(p12) import failed!报错问题如何解决
490 67
uniapp开发ios打包Error code = -5000 Error message: Error: certificate file(p12) import failed!报错问题如何解决
|
存储 缓存 安全
基于iOS平台的高效图片缓存策略实现
【4月更文挑战第22天】 在移动应用开发中,图片资源的加载与缓存是影响用户体验的重要因素之一。尤其对于iOS平台,由于设备存储空间的限制以及用户对流畅性的高要求,设计一种合理的图片缓存策略显得尤为关键。本文将探讨在iOS环境下,如何通过使用先进的图片缓存技术,包括内存缓存、磁盘缓存以及网络请求的优化,来提高应用的性能和响应速度。我们将重点分析多级缓存机制的设计与实现,并对可能出现的问题及其解决方案进行讨论。
|
存储 缓存 算法
实现iOS平台的高效图片缓存策略
【4月更文挑战第22天】在移动应用开发中,图片资源的处理是影响用户体验的重要因素之一。特别是对于图像资源密集型的iOS应用,如何有效地缓存图片以减少内存占用和提升加载速度,是开发者们面临的关键挑战。本文将探讨一种针对iOS平台的图片缓存策略,该策略通过结合内存缓存与磁盘缓存的机制,并采用先进的图片解码和异步加载技术,旨在实现快速加载的同时,保持应用的内存效率。
|
存储 缓存 编解码
实现iOS平台的高效图片缓存策略
【4月更文挑战第23天】在移动应用开发领域,尤其是图像处理密集型的iOS应用中,高效的图片缓存策略对于提升用户体验和节省系统资源至关重要。本文将探讨一种针对iOS平台设计的图片缓存方案,该方案通过结合内存缓存与磁盘缓存的多层次结构,旨在优化图片加载性能并降低内存占用。我们将深入分析其设计理念、核心组件以及在实际场景中的应用效果,同时对比其他常见缓存技术的优势与局限。
|
存储 Web App开发 Android开发
iOS不支持WebP格式图片解决方案和iPhone 7及其后硬件拍照的HEIC格式图片
iOS不支持WebP格式图片解决方案和iPhone 7及其后硬件拍照的HEIC格式图片
1070 1
iOS不支持WebP格式图片解决方案和iPhone 7及其后硬件拍照的HEIC格式图片
按钮的image图片是非圆角,直接对UIButton设置圆角,iOS13系统没有圆角效果的问题及解决方案
按钮的image图片是非圆角,直接对UIButton设置圆角,iOS13系统没有圆角效果的问题及解决方案
125 0
|
存储 缓存 监控
实现iOS平台的高效图片缓存策略
【4月更文挑战第18天】在移动应用开发中,图片资源的加载与缓存是影响用户体验的重要因素之一。特别是对于iOS平台,合理设计图片缓存策略不仅能够提高应用的响应速度,还能降低内存消耗和网络流量。本文将探讨一种针对iOS环境的图片缓存方案,该方案通过多级缓存机制、内存管理和磁盘存储策略相结合,旨在提升图片加载效率并优化性能。
190 0
|
存储 缓存 iOS开发
基于iOS的高效图片缓存策略实现
【4月更文挑战第9天】在移动应用开发中,图片资源的加载与缓存是影响用户体验的重要因素之一。特别是对于iOS平台,合理设计图片缓存策略不仅能够提升用户浏览图片时的流畅度,还能有效降低应用程序的内存压力。本文将介绍一种针对iOS环境优化的图片缓存技术,该技术通过多级缓存机制和内存管理策略,实现了图片快速加载与低内存消耗的目标。我们将从系统架构、关键技术细节以及性能评估等方面展开讨论,为开发者提供一套实用的图片缓存解决方案。
209 0
|
iOS开发
iOS - 设置图片为背景色,且拉伸到指定大小
iOS - 设置图片为背景色,且拉伸到指定大小
411 0
|
编解码 iOS开发
iOS中图片(UIImage)拉伸技巧
iOS中图片(UIImage)拉伸技巧
445 0
iOS中图片(UIImage)拉伸技巧

热门文章

最新文章