我一直在使用终端转换我叫左pvrtc
格式jpg
形象,出现这种情况:如何将图像转换为PVRTC格式
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/texturetool -e PVRTC --bits-per-pixel-2 -o left.pvrtc left.jpg
Failed to load image
Failed to perform Encode
我一直在使用终端转换我叫左pvrtc
格式jpg
形象,出现这种情况:如何将图像转换为PVRTC格式
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/texturetool -e PVRTC --bits-per-pixel-2 -o left.pvrtc left.jpg
Failed to load image
Failed to perform Encode
变化:
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/texturetool -e PVRTC --bits-per-pixel-2 -o left.pvrtc left.jpg
要:
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/texturetool -e PVRTC --bits-per-pixel-2 -o left.pvr left.PNG
该文件必须是PNG
有关OSX 10.10+的更新说明
在终端中,点击cd
以确保您位于根目录中。
cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ && ls
这应该告诉你的所有工具有(请确保您看到texturetool
)的列表 - 如果你不这样做,更新您的操作系统,然后的Xcode
一旦你知道它的存在,cd
回你的根目录并运行像工具:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/texturetool -e PVRTC --bits-per-pixel-2 -f PVR -o [new path to pvr to go] [path of original png]
你输出pvr
路径可以是~/whatever/image.pvr
和您的输入png
是您的图像转换为的路径。
的
iPhone SDK
包括一个工具,可以让你在PVRTC压缩格式创建的纹理,恰当地命名为texturetool
。如果您在默认位置(/ Developer/Platforms /)中安装了带有iPhone OS 2.2 SDK的Xcode,则texturetool
位于:/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/texturetool
。
texturetool
允许您创建PVRTC
数据的四个变体,主要区别是质量和大小之间的折衷。您将不得不尝试使用这些变体来确定哪个设置是每个单独纹理图像的最佳折衷方案。
HERE是一些相同的代码,以帮助,一旦你有你的pvrtc
文件
HERE是一些文档
HERE是PVRTC
东西
可能使用http://stackoverflow.com/questions/6671680/pvr-texturetool-build-phase。那么,你在图像的完整路径中是否有空间? – occulus