开发者

BitmapFactory.decodeFile Question in Android

开发者 https://www.devze.com 2023-03-01 03:32 出处:网络
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 ?

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

精彩评论

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