开发者

BitmapFactory.decodeFile Question in Android

I used the BitmapFactory.decodeFile method to decode an image file in Android.

About the output bitmap, what is the property of the Bitmap.Config ?

(ALPHA_8 , ARGB_4444, ARGB_8888 or R开发者_运维百科GB_565 ?)

Thanks


If you're asking for more information on these values you must read this blog entry: http://www.curious-creature.org/2010/12/08/bitmap-quality-banding-and-dithering/

edit: You're asking what the value of Bitmap.Config will be after using the Bitmap.decodeFile():Bitmap method.

According to API you can use either decodeFile with param pathName:String or with params pathName:String and opts:Bitmap.Options. That second method accepts options for decoding. One of these is a Bitmap.Config param with this information (again from API):

public Bitmap.Config inPreferredConfig If this is non-null, the decoder will try to decode into this internal configuration.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜