如何在 iPhone 中将 .pvr (PVRTC) 文件转换为 .png?
我需要在 iphone 运行时将一些图像从 pvr 转换为 png。我需要读取它们,解压缩,转换一些颜色,然后再次保存为 pvr 或 png。有什么建议吗?
I need to convert some images from pvr to a png, in run-time in iphone. I need to read them, decompress, transform some colors and then save then to pvr again or png. Any advice ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是苹果 示例程序,向您展示如何使用包含的 PVRTexture 类加载 PVR 纹理文件,然后使用 OpenGL 显示它们。
This is apple example program that shows you how to load PVR texture files using the included PVRTexture class and then display them using OpenGL.
您具体指的是压缩的 PVRTC 纹理还是 PVR 支持的任何格式(例如 565、1555)?另外,您想对颜色进行什么样的转换?
我问的原因是,IIRC,Imagination Technologies 开发网页,但如果您想更改 PVRTC 压缩纹理的颜色而不实际完全重新压缩数据,那么您可以实现的功能将受到限制。当然,改变区域的色调等是可能的,但操纵单个像素可能太困难了。
Do you specifically mean compressed PVRTC textures or any of the formats (e.g. 565, 1555) supported under the PVR? Also, what sort of transformations did you want to do to the colours?
The reason I ask is that, IIRC, there is code to read/manipulate PVR files on the Imagination Technologies dev web pages but if you want to change the colours of PVRTC compressed textures without actually recompressing the data entirely, there will be limits to what you can achieve. Certainly, changing the hue of regions etc will be possible, but manipulating individual pixels is likely to be too difficult.