简体   繁体   中英

Decompressing a PVRTC compressed image format?

I'm trying to open some textures from an iPhone game that I believe are using the PVRTC format (Pictured below)

PVRTC image format?

However everything I've tried in regards to opening it has failed. The PVRTexTool won't decompress it, the program only opens files with the extension .PVR and doesn't recognise it. I've also tried using TexturePacker but it doesn't recognise it either. It's been baffling me for a few days, any help towards decompressing the file would be appreciated thanks.

I can only offer some suggestions.

iOS restricts PVRTC textures to be square and power of 2 sizes, and they will be either 2bpp or, more likely, 4bpp. Therefore if we initially assume no MIP mapping, there can thus be only a few possible sizes for the raw data. From that you might be able to deduce the size of any header data and strip that off. I think the PowerVR SDK from Imagination Tech provides decoder source code in C (or at least it did last time I checked though admittedly that was a few years ago) if you have that raw data. Also, the data might be in Morton order.

If MIP mapping is used, then I think you'll need to include the entire MIP map chain in your size calculation, but note that the small maps will be rounded up to at least 8bytes each.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM