軟件可以把Pvr格式的文件轉(zhuǎn)換為bmp格式的位圖文件,目前只提供pvr文件轉(zhuǎn)換為bmp,不提供bmp轉(zhuǎn)換pvr。
pvr格式:
pvr格式是iOS的顯示芯片可以直接讀取的,不需要經(jīng)過解析就能直接顯示,所以渲染速度更快,更節(jié)省內(nèi)存。
PVRTC2和PVRTC4是兩種pvr壓縮的圖像格式,他們都是pvr文件。這兩種圖像格式比普通圖像有更快的加載速度和更小的內(nèi)存占用。
PVRTC4: Compressed format, 4 bits per pixel, ok image quality
PVRTC2: Compressed format, 2 bits per pixel, poor image quality
一般pvr格式文件的圖像格式有:
RGBA8888: 32-bit texture with alpha channel, best image quality
RGBA4444: 16-bit texture with alpha channel, good image quality
RGB565: 16-bit texture without alpha channel, good image quality but no alpha (transparency)
圖像占用內(nèi)存的公式是:numBytes = width * height * bitsPerPixel / 8
也就是說2048*2048的RGBA8888占用內(nèi)存16MB,而PVRTC4只占用2MB