How to read a file into a Java Bitmap?
11,606
Solution 1
Use BitmapFactory
if you already have your byte array:
Bitmap bitmap = BitmapFactory.decodeByteArray(yourByteArray, offset, length);
Solution 2
Skip the byte array if you want: Bitmap bitmap = BitmapFactory.decodeFile(filename);
Author by
Admin
Updated on June 17, 2022Comments
-
Admin almost 2 years
I know how to read a bitmap file into a byte array. How is the byte array then converted to a Java Bitmap?