pvrtextool compression artifact?

Hi.



I’m running pvrtextool to compress a texture to use as a 2d sprite on iOS. My original image is square, 56x56 pixels, and I repeated the borders by 4 pixels to avoid the wrap around from the repeat, so ends up as 64x64. I’m running this version on linux:



PVRTexToolCL version 3.4

SDK Version: 3.3@2825756

PVRTexLib 4.13 | JpegLib version 6b | LibPNG version 1.5.12



with the following options:



pvrtextool -i /tmp/image.png -o /tmp/image.pvr -f PVRTC1_4 -m 0 -legacypvr



My problem is that it’s creating some artifacts in the corners, as shown here (zoomed in our our PC renderer using opengl, original on the right, compressed version on the left):



http://imgur.com/SulxYbf



The black corners on the original are all black pixels, completely transparent (so 0, 0, 0, 0, 4x4 pixels), but on the compressed image they seem to get polluted by adjacent pixels, which is causing some artifacts on the corners when I show the inner square as a sprite. I also tried to fill those corners with the pixels on the corner of the original image (so the top left corner filled with the pixel on 0,0 of the original), but I had similar artifacts.



Is there a way to avoid this, or just to use pvr compressed images as sprites in general?



Thanks!

Hi,



When you’ve reproduced the artefacts in your OpenGL PC render, how is the image decompressed? Do the artefacts occur when the image is viewed in PVRTexToolGUI?



Thanks,

Joe