zoukankan      html  css  js  c++  java
  • ios上的pvr与png

    pvr格式是iOS的显示芯片可以直接读取的,不需要经过解析就能直接显示,所以渲染速度更快,更节省内存。

    Zwoptex有一个项叫“ccz压缩”, 图像的大小几乎可以减小一半。文件格式成了:xxx.pvr.ccz,cocos2d是可以识别的。
     
    PVRTC2PVRTC4是两种pvr压缩的图像格式,他们都是pvr文件。这两种图像格式比普通图像有更快的加载速度和更小的内存占用。
    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)
     
    图像占用内存的公式是:numBytes = width * height * bitsPerPixel / 8
    也就是说2048*2048的RGBA8888占用内存16MB,而PVRTC4只占用2MB
  • 相关阅读:
    待重写
    待重写
    待重写
    ReflectionUtils使用
    kafka消费组、消费者
    待重写
    Map接口常用实现类学习
    利用httpClient发起https请求
    sql常用格式化函数及字符串函数
    method reference
  • 原文地址:https://www.cnblogs.com/zwind/p/4128851.html
Copyright © 2011-2022 走看看