Imagination PowerVR SDK Blog

PVRTexTool color space options



Is there any chance a future version of PVRTexTool might add the option specify the color space of the input file? I think this would only really be useful when importing .png files, but since that’s the file type I’m currently dealing with I thought I’d make this post. :slight_smile:

My problem:

I’m currently in the process of trying to adopt .pvr files as a runtime format. Part of this task involves converting a bunch of artist-created .png files into .pvr files.

If I import a png file into PVRTexTool, it seems to assume the data is in a linear color space. This means that if I import a png containing sRGB data and then choose an encoding format with the sRGB color space, my data gets doubly encoded.

I can avoid this double encoding problem by instead selecting Linear RGB as the color space, but that seems undesirable as the color space listed in the output .pvr header won’t match the actual color space of the data-- I can no longer simply check the header and choose between e.g. GL_COMPRESSED_SRGB8_ETC2 and GL_COMPRESSED_RGB8_ETC2 and I’d like to avoid passing around an sRGB flag to my texture creation routines.

Other workarounds that come to mind are overwriting the color space in the header after encoding or ensuring that the png files already contain linear rgb data.

I’m currently leaning toward editing the header when needed, but I’m wondering if having the option to specify the color space of the input data might be a reasonable feature request.

I realize it’s possible that my understanding of how the tool works is wrong and I’m just missing something. I was surprised to not find any similar topics when I searched before creating this post.




Hi Soufi,

There’s an outstanding feature request against PVRTexTool to allow users to specify the colour space of their images (BRN50691). I’ve added a note to the feature request stating that you have also requested it. We won’t have time to implement this feature for our upcoming 4.0 SDK but will consider the request for a future release.