解决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 ...
随机推荐
- Aquarium Cycling
http://www.fishyou.com/aquarium-cycling.php Aquarium Cycling Aquarium cycling actually refers to the ...
- 【VB.NET】文本框快捷键支持
我们知道VB.NET中的文本框是不支持Ctrl+A的快捷键的. 如果让它支持呢? Private Sub txtSQL_KeyDown(ByVal sender As Object, ByVal e ...
- Change the Windows 7 Taskbar Thumbnail and List Mode
Manually in Registry Editor 1. Open the Start Menu, then type regedit in the search boxand press Ent ...
- 从Windows 2012标准版升级到数据中心版,标准评价版本升级到标准体验版本并激活
对于Windows 7.Windows 8操作系统,可以在图形界面中通过输入序列号,从低版本直接升级到高的版本,例如从Windows 7家庭版升级到专业版或旗舰版.而对于Windows Server ...
- 黑盒测试与白盒测试(Black box Testing)
黑盒测试和白盒测试的优缺点 类别 优点 缺点 黑盒测试 不需要了解软件代码 从用户角度出发 无法保证代码内各个路径被覆盖到 白盒测试 强制测试开发工程师关注代码的具体实现 揭露隐藏在代码中的Bug 是 ...
- boost的线程池和内存池 智能指针
内存池为boost自带的 #include <boost/pool/pool.hpp> 或者另外一个开源的库: nedmalloc 一个高效率的库 线程池需要下载另外一个开源库 http: ...
- ecshop 商品页面添加商品标签:
/* @脚垫客户 需要给商品加属性.最简单粗暴的办法.后台调用加入.界面没有美化. */ goods.dwt <ul class="quantity"> <h2& ...
- 【转载】OpenGL超级宝典笔记——GLSL语言基础
变量 GLSL的变量命名方式与C语言类似.变量的名称可以使用字母,数字以及下划线,但变量名不能以数字开头,还有变量名不能以gl_作为前缀,这个是GLSL保留的前缀,用于GLSL的内部变量.当然还有一些 ...
- 给pcm格式文件加wav文件头
#include <stdlib.h>#include <stdio.h>#include <string.h>void main(){ //wav头的结构如下所示 ...
- centos7 ip地址设置
centos7 ip地址设置 http://simonhu.blog.51cto.com/196416/1588971 CentOS系统 修改DNS 修改对应网卡的DNS的配置文件 # vi /etc ...