Android的Bitmap.Config中ALPHA_8、ARGB_4444、ARGB_8888和RGB_565

ALPHA_8:Each pixel is stored as a single translucency (alpha) channel.

      每个像素信息只存储了alpha这一项信息。

ARGB_4444:This field was deprecated in API level 13. Because of the poor quality of this configuration, it is advised to use ARGB_8888 instead. 

     这个值在level 13的时候就已经不被建议使用了,因为他是一个低质量的配置,它被建议使用ARGB_8888 

ARGB_8888:Each pixel is stored on 4 bytes. This configuration is very flexible and offers the best quality. It should be used whenever possible.

     每个像素信息占用4个字节(即32个二进制位)的存储空间,alpha、red、green、blue各占8个二进制位。这个配置项是非常灵活,并提供了最好的质量。他应该在可能的情况下尽量被使用。

RGB_565:Each pixel is stored on 2 bytes and only the RGB channels are encoded: red is stored with 5 bits of precision (32 possible values), green is stored with 6 bits of precision (64 possible values) and blue is stored with 5 bits of precision.This configuration may be useful when using opaque bitmaps that do not require high color fidelity

     每个像素信息占用2个字节(即16位二进制位)并且至存储了RGB的信息没有alpha信息,其中Red5位,Green6位,Blue5位。这个配置项在不需要提供透明度的情况下更有用。

480*800分辨率占用的内存空间是:480*800*4/(1024*1024)=1.5M

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章