Closed ansman closed 5 years ago
BitmapFactory.decodeByteArray returns null when inJustDecodeBounds == true, the proper way to read the size is to read the outWidth and outHeight properties of the options after the call.
BitmapFactory.decodeByteArray
null
inJustDecodeBounds == true
outWidth
outHeight
Another way to fix the issue is to simply use the size from camera properties instead of decoding the size from the byte array.
Hey! Thanks! I just read the docs and using outXXX looks the correct way to go!
outXXX
BitmapFactory.decodeByteArray
returnsnull
wheninJustDecodeBounds == true
, the proper way to read the size is to read theoutWidth
andoutHeight
properties of the options after the call.