Game Development Community

Getting pixel color from a PVR-image at a coordinate during run-time

by Simon Almqvist Pettersson · in iTorque 2D · 01/05/2012 (5:23 am) · 2 replies

Is it possible to pick a pixel inside a PVR-image and get the color value for it, while running the game?

I managed to get a color value for a pixel from a png-image, but it doesn't work when I try it on a PVR-image. So my guess it that PVR images works differently.
Does anyone know how to extract specific pixel information from a PVR image, or if it is possible at all?


#1
01/05/2012 (7:16 pm)
pvr's are compressed in memory so i am not sure you can. I may be wrong though.
#2
01/10/2012 (5:10 am)
You can but you have to ask OpenGL about it you can't read it in memory as they have no color data in the bytes array representing the image.

additionally they aren't loaded like resources and through the normal path but through the pvr loader library from iOS, so its definitely some extra work involved.