解决cocos2dx在Xcode中运行时报:convert: iCCP: known incorrect sRGB profile 的问题
解决cocos2dx在Xcode中运行时报:convert: iCCP: known incorrect sRGB profile 的问题
本文的实践来源是参照了两个帖子完成的:
http://discuss.cocos2d-x.org/t/cocos2d-x-3-0-and-libpng/12451、
http://www.myexception.cn/image/462530.html,
感谢以上作者的分享。。。
以前每次运行cocos2dx 的程序时总是报警告:convert: iCCP: known incorrect sRGB profile,
今天来解决一下。。。
要解决这个问题需要在终端(Mac)运行 ImageMagick的convert命令:
find . -type f -name "*.png" -exec convert {} -strip {} \;
可是经过若干次尝试发现convert()原来是ImageMagick 中的命令,遂有了下面先安装ImageMagick 的过程。。。
1,先安装ImageMagick 所依赖的库,因为我们的工程中仅仅用到了PNG的图,所以此处就以PNG库为例,其他类似。。。
到 http://www.imagemagick.org/download/delegates/ 下载对应的库,
此处仅下载 libpng-1.6.14.tar.gz 包,然后通过下面的命令安装:
tar xzvf libpng-1.6.14.tar.gz
cd libpng-1.6.14
./configure
make
sudo make install
2,安装ImageMagick,
curl -O ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
tar xzvf ImageMagick.tar.gz
cd ImageMagick-6.7.6-5
./configure --prefix=/opt/ImageMagick --enable-share --enable-static LDFLAGS="-L/usr/lib64" CPPFLAGS="-I/usr/include”
make
sudo make install
3,验证PNG依赖库有没有安装成功,
运行
/opt/ImageMagick/bin/convert -list format,
在结果中查找是否含有 PNG*,有的话说明依赖库已经安装成功,否则没有成功,然后回去仔细检查是否按照本教程一步步的安装,亦或是参照上面的两个连接查找原因。。。
4,好了,既然安装好了ImageMagick,那么convert函数便可以用了,在命令行 cd 到自己的工程资源目录,运行下面的 命令来解决上面提到的问题
find . -type f -name "*.png" -exec /opt/ImageMagick/bin/convert {} -strip {} \;
5,扩展:当然ImageMagick还有很多其他非常强大 的功能,此处便不意义列举了,想了解的话可以自己去查。。。
解决cocos2dx在Xcode中运行时报:convert: iCCP: known incorrect sRGB profile 的问题的更多相关文章
- 解决 free(): invalid pointer: 0x00000000019ff700 运行时报错(caffe)(libtool使用)
编译成功,运行时报错: 在使用 pytorch or tensorflow or caffe 时,都可能存在这个问题: *** Error in `xxx': free(): invalid poin ...
- (解决方法)Android studio 运行时报错Do you want to uninstall the existing application?的解决方法
在Android studio中,有时运行会报错: WARNING: Uninstalling will remove the application data!Do you want to unin ...
- 解决:在Eclipse中运行monkeyrunner脚本报错: IOError: (2, 'File not found - D:\\workspace\\monkeyrunner_test01 (\u62d2\u7edd\u8bbf\u95ee\u3002)')
在eclipse中搭建运行monkeyrunner脚本的环境,请见lynnLi的博客monkeyrunner之eclipse中运行monkeyrunner脚本之环境搭建(四) 但在实践中,状况确实层出 ...
- windows系统下的maven项目放到linux系统中运行时报org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnection这种异常的解决办法
这个错误的解决办法其实很简单你把连接mysql数据库的那个jar包换成linux版本的就行了: linux版本的连接mysql数据库的jar包链接:http://files.cnblogs.com/f ...
- 在Eclipse中运行Jboss时出现java.lang.OutOfMemoryError:PermGen space及其解决方法
在Eclipse中运行Jboss时出现java.lang.OutOfMemoryError:PermGen space及其解决方法 在Eclipse中运行Jboss时,时间太长可能有时候会出现java ...
- 使用Unity游戏引擎在IOS模拟器中运行的方法
在Unity编译IOS程序时,在Unity导航栏菜单中选择Edit->ProjectSettings ->Player(菜单项)选择IOS平台在下方SDK Version处选择运行设备为I ...
- cocos2dx在win10系统上的VS2017运行时报错:丢失MSVCR110.dll
如题,运行环境为cocos2dx 3.14.1,win10系统,VS2017. 编译cocos2dx的cocos2d-x-3.14.1/build/cocos2d-Win32.sln已通过,不过运行时 ...
- 如何解决grails2.3.2中不能运行fork模式
升级到grails 2.3.2之后,运行时报如下的异常: Exception in thread "main" Error | Forked Grails VM exited wi ...
- Xcode中c++&Object-C混编,详细介绍如何在cocos2dx中访问object函数以及Apple Api
转自:http://www.himigame.com/iphone-cocos2dx/743.html Cocos2dx系列博文的上一篇详细介绍了如何在Xcode中利用jni调用Android的Jav ...
随机推荐
- Codeforces Round #228 (Div. 1) A
A. Fox and Box Accumulation time limit per test 1 second memory limit per test 256 megabytes input s ...
- Ms sql pivot unpivot
--建表 create table dbo.orders ( orderid int not null primary key nonclustered, orderdate datetime not ...
- MAT内存问题分析定位
MAT内存问题分析定位 1.下载安装MemoryAnalyzer工具. 2.使用DDMS将对应线程的内存日志导出来后,使用hprof-conv工具进行转换,用MAT打开转换后的hprof文件.
- Python学习笔记(二)基本语法
Class 2 一.交互式编程 交互式编程不需要创建脚本文件,是通过 Python 解释器的交互模式进来编写代码. linux上你只需要在命令行中输入 Python 命令即可启动交互式编程,如下图: ...
- 控件的相对位置与绝对位置-UI界面编辑器(SkinStudio)教程
绝对位置: 相对位置: 相对位置配合Anchor属性使用 例如Anchor属性选择left|top(即相对位置的left和top保持不变) 窗口大小改变前: 窗口大小改变后: 可以看到控件相对位置的l ...
- Action类中获取request等对象的方法
struts2中的action类中,SevletActionContext可以获取
- php解析json数组
function urltest(){ $url='http://121.43.153.80:8983/solr/collection1/select?q=+searchkey%3a%E4%BC%9A ...
- winform调用浏览器
方法1: private void button1_Click(object sender, EventArgs e) .{ . //从注册表中读取默认浏览器可执行文件路径 . RegistryKey ...
- 连接Oracle的帮助类
package util; import java.sql.Connection;import java.sql.DriverManager;import java.sql.PreparedState ...
- 在将 varchar 值 '1,2,3,4,5,6,7,8' 转换成数据类型 int 时失败。
alter PROCEDURE PrTradingDelete ) AS BEGIN WHERE id in(@id) END GO 执行上面这个存储过程会异常.提示 :在将 varchar 值 '1 ...