1

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.

Archer96
  • 13
  • 3
  • 1
    Unless you're looking for programming help with this problem — e.g. writing your own app to parse the file — this question is off-topic for SO. Try [su], [apple.se], or maybe [gaming.se]. Note, however, that PVRTC is an image data encoding, not a file format... there are any number of ways that a game developer could choose to wrap PVRTC data in a file. – rickster Dec 09 '16 at 20:30

1 Answers1

0

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.

Simon F
  • 1,036
  • 8
  • 23