Android中的BitmapFactory.decodeFile问题

时间:2011-04-27 07:28:06

标签: android

我使用BitmapFactory.decodeFile方法解码Android中的图像文件。

关于输出位图,Bitmap.Config的属性是什么?

(ALPHA_8,ARGB_4444,ARGB_8888或RGB_565?)

谢谢

1 个答案:

答案 0 :(得分:1)

如果您要求提供有关这些值的更多信息,请阅读以下博文:http://www.curious-creature.org/2010/12/08/bitmap-quality-banding-and-dithering/

编辑:你问在使用Bitmap.decodeFile():Bitmap方法后Bitmap.Config的值是多少。

根据API,您可以使用decodeFile和param pathName:String或params pathName:String和opts:Bitmap.Options。第二种方法接受解码选项。其中一个是带有此信息的Bitmap.Config参数(再次来自API):

public Bitmap.Config inPreferredConfig如果这是非null,解码器将尝试解码为此内部配置。