ios – 如何将图像转换为PVRTC格式
我一直在使用终端将名为left的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回到你的root并运行工具,如: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/texturetool -e PVRTC –bits-per-pixel-2 -f PVR -o [pvr去的新路径] [原来的路径] 您的输出pvr路径可以是?/ whatever / image.pvr,输入png是要转换的图像的路径. HERE和HERE是其他很好的演练
> Apple Docs HERE是一些相同的代码,一旦你有了你的pvrtc文件就可以提供帮助 HERE是一些更多的文档 HERE是关于PVRTC的好东西 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |