问题
I know how to read a bitmap file into a byte array. How is the byte array then converted to a Java Bitmap?
回答1:
Use BitmapFactory
if you already have your byte array:
Bitmap bitmap = BitmapFactory.decodeByteArray(yourByteArray, offset, length);
回答2:
Skip the byte array if you want: Bitmap bitmap = BitmapFactory.decodeFile(filename);
来源:https://stackoverflow.com/questions/4097088/how-to-read-a-file-into-a-java-bitmap