Android的位图内存的问题 - ARGB_4444 VS RGB_565 [英] Android Bitmap memory question - ARGB_4444 vs RGB_565

查看:324
本文介绍了Android的位图内存的问题 - ARGB_4444 VS RGB_565的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当加载图像成位图,该方法消耗更多的内存(ARGB_4444 VS RGB_565)?

When loading an image into a bitmap, which method consumes more memory (ARGB_4444 vs RGB_565) ?

感谢。

推荐答案

他们采取相同的内存量。 (见这些数字呢?他们告诉你的位数为每个组件(A,R,G,B)。把他们加起来得到每个像素的总位数)。

They take the same amount of memory. (See those numbers? They tell you the number of bits for each component (A, R, G, B). Add them up to get the total bits per pixel.)

如果您不需要透明度,但是,这两个的我建议你RGB_565因为它给你更多的不同的颜色。 ARGB_4444牺牲了一些它的颜色深度,以提供透明度

If you don't need the transparency, though, of those two i'd recommend RGB_565 as it gives you more distinct colors. ARGB_4444 sacrifices some of its color depth in order to provide transparency.

这篇关于Android的位图内存的问题 - ARGB_4444 VS RGB_565的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆