Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Read in JPG as RGB888 on Android

I'm trying to read in a .jpg using BitmapFactory. I want to get a RGB888 formatted bitmap, but I keep seeming to get RGB565. Is there anyway to change this?

like image 470
Jay Avatar asked Oct 14 '22 17:10

Jay


1 Answers

BitmapFactory methods let you pass a BitmapFactory.Options instance. You can use BitmapFactory.Options to specifcy the inPreferredConfig, which defines the format of the Bitmap returned after decoding, just set it to Bitmap.Config.ARGB_8888.

like image 190
Romain Guy Avatar answered Nov 15 '22 12:11

Romain Guy