I\'m making several calls to BitmapFactory.decodeFile()
and BitmapFactory.decodeResource()
, and I\'d like to specify the format the bitmaps are dec
When you have bitmap you can call copy method on it specifying BitmapConfig which is basically what you want. http://developer.android.com/reference/android/graphics/Bitmap.html#copy(android.graphics.Bitmap.Config,boolean)
This might be what you are looking for:
BitmapFactory.Options op = new BitmapFactory.Options();
op.inPreferredConfig = Bitmap.Config.ARGB_8888;
bitmap = BitmapFactory.decodeFile(path, op);