I’m loading my bitmaps with preferred config RGB565 from my assets folder and logging their format config but i’m always getting ARGB8888.I’m sure about some of my bitmap’s config is RGB565 but i think they covers an area like an ARGB8888 bitmap.How can i load them with their own formats?
BitmapFactory.Options options = new BitmapFactory.Options();
options.inPreferredConfig = Config.RGB_565;
Bitmap bitmap = BitmapFactory.decodeStream(in,null,options);
Log.d("a", fileName+" "+bitmap.getConfig().name());
You wont always get RGB565 that way – it depends on the encoding (its a preferred encoding)
After loading the bitmap you can create a new one and copy it to there… as you are effectively re-encoding the image.
Then you can use maskBitmap as the loaded bitmap.