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

activeoldestvotes

up vote41down voteaccepted

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

up vote33down vote

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)

up vote22down vote

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)

up vote8down vote

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: 330987132 | Go:217696290 | Python:336880185 | 做人要厚道,转载请注明出处!http://www.cnblogs.com/sunshine-anycall/p/3272858.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/261271.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

设计模式之十(外观模式)

前言 外观模式:为子系统中的一组接口提供一个一致的界面,此模式定义了一个高层接口,这个接口使得这一系统更加容易使用. 结构图 SubSystem Class 子系统类集合 实现子系统的功能,处理Facade对象指派的任务,注意子类中没有Facade的任何信息,即…

sunday java_Sunday算法:最快的字符串匹配算法

之前被KMP的next数组搞的头昏脑胀说不上也是比较烦人的,今天看到还有这么有趣而且高效的算法(比KMP还快),看来有必要做一点笔记了Sunday算法是Daniel M.Sunday于1990年提出的字符串模式匹配算法,其简单、快速的特点非常好!思路其核…

Apache不记录制定文件类型日志

vim /usr/local/apache2/conf/extra/httpd-vhosts.conf在CustomLog 行上加入如下代码:SetEnvIf Request_URI ".*\.gif$" p_w_picpath-requestSetEnvIf Request_URI ".*\.jpg$" p_w_picpath-requestSetEnvIf Request_URI ".*\.png$" p…

小波分析实验: 实验1 连续小波变换

实验目的: 在理解连续小波变换原理的基础上,通过编程实现对一维信号进行连续小波变换,(实验中采用的是墨西哥帽小波),从而对连续小波变换增加了理性和感性的认识,并能提高编程能力,为…

句子中单词首字母大写转换

//函数将句子中的每个单词的首字母改为大写 string first_letter(string& sentence) {//定义string 指针,并指向string 首地址string::iterator itsentence.begin ();//定义 关键 标志,反映检测到空格字符bool space_flagtrue;//string 指针未到字符…

java axmlprinter_安卓xml配置文件解析工具-AXMLPrinter2.jar(androidmanifest.xml 反编译)下载官方最新版-西西软件下载...

AXMLPrinter2.jar apk分析APK文件,取得APK文件中的 包名、版本号及图标,很强大的工具,再一次感受到了批处理的牛逼。可以将android安卓编译过的二进制XML文件(binary xml file)反编译明文输出保存。是apk反编译修改的必备工具之一。例如需要查…

UML用例图说明

转自:http://www.360doc.com/content/10/1206/23/3123_75672033.shtml 前些时间参加了潘加宇老师的技术讲座,UML建模技术受益匪浅。我也把平时的一些积累和上次的收获总结在这篇文章中,主要讲解用例图相关的知识。 用例图是软件需求分析…

MySQL 按指定字段自定义列表排序

问题描述大家都知道, MySQL 中按某字段升序排列的 SQL 为 (以 id 为例, 下同):SELECT * FROM MyTable WHERE id IN (1, 7, 3, 5) ORDER BY id ASC降序排列的 SQL 为:SELECT * FROM MyTable WHERE id IN (1, 7, 3, 5) ORDER BY id DESC有时以上排序并不能满足我们的需求. 例如, …

WordPress get_allowed_mime_types函数(wp-includes/functions.php)存在跨站脚本漏洞

漏洞版本: WordPress 3.6 漏洞描述: CVE ID:CVE-2013-5738WordPress是一种使用PHP语言开发的博客平台,用户可以在支持PHP和MySQL数据库的服务器上架设自己的网志WordPress get_allowed_mime_types函数(wp-includes/functions.php)存在安全漏洞,由于不正确…

java迪杰斯特拉算法_迪杰斯特拉算法完整代码(Java)

package com.rao.graph;import java.util.*;/*** author Srao* className Dijkstra* date 2019/12/10 22:15* package com.rao.graph* Description 迪杰斯特拉算法*/public class Dijkstra {/*** 图的顶点*/private static class Vertex{String data;Vertex(String data){this.…

Android 布局学习之——Layout(布局)详解一

layout(布局)定义了用户界面的可视化结构(visual structure),如Activity的UI,应用窗口的UI。 有两种方式声明layout: 1.在xml文件中声明UI组件。 2.在运行时,实例化布局元素。我们可以以编码的方式创建View或ViewGroup…

查询表结构

方法一SELECT 序号C.column_id, 列名C.name, 是否主键ISNULL(IDX.PrimaryKey,N), 数据类型T.name, 长度C.max_length, PrecisionC.precision, 小数位C.scale, 允许空CASE WHEN C.is_nullable1 THEN N是ELSE N否 END, 默认值ISNULL(D.definition,N),…

java window linux_java编程在linux下和windows下有什么区别。。。

在windows系统下编程没有点问题,一旦放在linux上就出现以下错误Strutshasdetectedanunhandledexception:Messages:...在windows系统下编程没有点问题,一旦放在linux上就出现以下错误 Struts has detected an unhandled exception: Messages: There is no…

SendMessage函数的常用消息及其应用大全

来源:http://www.360doc.com/content/09/0814/10/19147_4907488.shtml,非常全面的解释。 文本框控件通常用于输入和编辑文字。它属于标准 Windows 编辑控件的一个子类,所以它支持所有编辑控件消息。这儿讲述的技术也适用于由其他厂商设计的,以Windows编辑…

初识jQuery(适合初学者哟.........)

您要知道!! jQuery是目前使用最广泛的javascript函数库。据统计,全世界排名前100万的网站,有46%使用jQuery,远远超过其他库。 微软公司甚至把jQuery作为他们的官方库。对于网页开发者来说,学会jQuery是必要的。因为它让你了解业界…

java方法区对象类型_浅谈Java内存区域与对象创建过程

一、java内存区域Java虚拟机在执行Java程序的过程中会把它所管理的内存划分为若干个不同的数据区域。这些区域都有各自的用途,以及创建和销毁的时间,有的区域随着虚拟机进程的启动而存在,有的区域则依赖用户线程的启动和结束而建立和销毁。根…

Week1 Team Homework #2 Introduction of team member with photos

小组成员介绍 组长:黄剑锟 11061164 组员:顾泽鹏 11061160 组员:周辰光 11061154 组员:龚少波 11061167 组员:赵骞 11061155 组员:孙时 11061146 组员&am…

TextView控件

下面我们将比较一下Android中的TextView和C#Winform中TextBox的不同。 当我们要获取一个文本框控件时。 C#:TextBox1                      //直接输入控件的名称即可 Android:TextView tv (TextView) this.findViewById(R.id.tv); // 获取…

[Silverlight入门系列]使用MVVM模式(3):Model的INotifyPropertyChanged接口实现

当客户端绑定一个数据模型以后,数据模型变化以后可以自动通知客户端更新界面显示,这就是INotifyPropertyChanged接口要做的工作。INotifyPropertyChanged 接口用于向客户端(通常是执行绑定的客户端)发出某一属性值已更改的通知。例…

inttostr java_Delphi和Java实现webservice架构

Webservice现在已经不是什么新技术了,用java建立webservice是快捷的,但是用java在制作客户端的感觉上总是不如 Delphi的(个人感觉,java高手们不要笑话我),那我们就用java实现webservice的服务端程序,delphi制作客户端。…