# pvr file format specification 2

**URL:** <https://forums.imgtec.com/t/pvr-file-format-specification-2/1776>\
**Category:** PowerVR Insider\
**Created:** [April 30, 2013, 5:59pm UTC](https://forums.imgtec.com/t/pvr-file-format-specification-2/1776 "2013-04-30T17:59:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris2001net](https://avatars.discourse-cdn.com/v4/letter/c/c5a1d2/32.png) [@chris2001net](https://forums.imgtec.com/u/chris2001net)\
**Post date:** [April 30, 2013, 5:59pm UTC](https://forums.imgtec.com/t/pvr-file-format-specification-2/1776/1 "2013-04-30T17:59:08Z")

</div>

Hi I am trying add an older pvr file format to my image loader code, the pvr header is not version 3 but version 2  
  
  
  
uint32\_t headerLength;  
  
uint32\_t height;  
  
uint32\_t width;  
  
uint32\_t numMipmaps;  
  
uint32\_t flags;  
  
uint32\_t dataLength;  
  
uint32\_t bpp;  
  
uint32\_t bitmaskRed;  
  
uint32\_t bitmaskGreen;  
  
uint32\_t bitmaskBlue;  
  
uint32\_t bitmaskAlpha;  
  
uint32\_t pvrTag;  
  
uint32\_t numSurfs;  
  
  
  
can someone point me in the direction to the rest of the file format?  
  
  
  
thanks in advance.

---

<div class="post-metadata">

**Author:** ![tobias](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tobias](https://forums.imgtec.com/u/tobias)\
**Post date:** [May 1, 2013, 7:07am UTC](https://forums.imgtec.com/t/pvr-file-format-specification-2/1776/2 "2013-05-01T07:07:07Z")

</div>

Hi Chris,  
  
  
  
There’s not really one available at present. We never wrote a specification that is quite as complete as the PVR v3 version, but there was something tucked away in the old PVRTexLib documents which should be suitable. I assume you’ve already looked at the code in the tools to get as far as you can.  
  
  
  
So there’s two ways you can get the document, either you can visit our legacy SDK page and download one of the legacy packages from there (2.8 will still be entirely PVR v1/2), or if you send an email to [DevTech@imgtec.com](mailto:DevTech@imgtec.com) we can send you the document directly.  
  
  
  
Thanks,  
  
Tobias

---

<div class="post-metadata">

**Author:** ![chris2001net](https://avatars.discourse-cdn.com/v4/letter/c/c5a1d2/32.png) [@chris2001net](https://forums.imgtec.com/u/chris2001net)\
**Post date:** [May 1, 2013, 9:01am UTC](https://forums.imgtec.com/t/pvr-file-format-specification-2/1776/3 "2013-05-01T09:01:10Z")

</div>

thanks for the help Tobias 🙂

---

<div class="post-metadata">

**Author:** ![chris2001net](https://avatars.discourse-cdn.com/v4/letter/c/c5a1d2/32.png) [@chris2001net](https://forums.imgtec.com/u/chris2001net)\
**Post date:** [May 1, 2013, 10:03am UTC](https://forums.imgtec.com/t/pvr-file-format-specification-2/1776/4 "2013-05-01T10:03:59Z")

</div>

I found the legacy page but I can’t see which v2.8 you mean, I’ve downloaded a couple but lost.  
  
  
  
[https://www.imgtec.com/powervr/insider/sdkdownloads/legacy.asp](https://www.imgtec.com/powervr/insider/sdkdownloads/legacy.asp)  
  
  
  
I’ve emailed your team too in case they can point me to it sooner.  
  
  
  
I’ve found code here  
  
[http://developer.apple.com/library/ios/#samplecode/PVRTextureLoader/Listings/Classes\_PVRTexture\_m.html#//apple\_ref/doc/uid/DTS40008121-Classes\_PVRTexture\_m-DontLinkElementID\_12](http://developer.apple.com/library/ios/#samplecode/PVRTextureLoader/Listings/Classes_PVRTexture_m.html#//apple_ref/doc/uid/DTS40008121-Classes_PVRTexture_m-DontLinkElementID_12)  
  
  
  
which does a mask on the flag header element and expects either  
  
kPVRTextureFlagTypePVRTC\_2 = 24,  
  
kPVRTextureFlagTypePVRTC\_4 = 25  
  
  
  
(version 2?)  
  
  
  
but I get neither of those I get a flag value of 18 which means the pvr files I’ve been given are a different version, maybe version 1.  
  
  
  
(note the rest of the header is correct, and get the PVR! identifier and correct values for height / width etc )  
  
  
  
Any help much appreciated.

---

<div class="post-metadata">

**Author:** ![tobias](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tobias](https://forums.imgtec.com/u/tobias)\
**Post date:** [June 10, 2013, 3:38pm UTC](https://forums.imgtec.com/t/pvr-file-format-specification-2/1776/5 "2013-06-10T15:38:47Z")

</div>

Hi Chris,  
  
  
  
Sorry I haven’t gotten back to this sooner, I was off with the flu last week and wasn’t able to get back to you. So I’m afraid your email hasn’t actually come through - could you try resending? Alternatively, did you sign up to the forum with an email address I can send the document to? I can send something to that address if you like?  
  
  
  
As for the texture flag type, that actually refers to the texture compression format, not the file version, and they are actually enum values which are laid out in the old document, or in PVRTTexture.h in the PVRTools. These values are consistent through PVRv1 and PVRv2 files, only PVRv3 uses a new type system.  
  
  
  
Regards,  
  
Tobias

---

<div class="post-metadata">

**Author:** ![abigail-rebellion](https://avatars.discourse-cdn.com/v4/letter/a/3ab097/32.png) [@abigail-rebellion](https://forums.imgtec.com/u/abigail-rebellion)\
**Post date:** [February 28, 2014, 11:59am UTC](https://forums.imgtec.com/t/pvr-file-format-specification-2/1776/6 "2014-02-28T11:59:24Z")

</div>

I suspect you may be getting a flag value of **0x** 18, which is 24, which is consistent with Apple’s code and the enum in PVRTTexture.h.
