You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is intentional. The first call passes an Options object with inJustDecodeBounds set to true. This causes the BitmapFactory to retrieve the dimensions without decoding the bitmap. In the following lines, these dimensions are used to compute a sampleSize to load an image that is approximately the same size as the screen. Then the second call to decodeStream decodes a bitmap with this size.
Was it intentionally, to have
BitmapFactory.decodeStream(getContentResolver().openInputStream(uri), null, opts);
called twice within the private Bitmap loadBitmapFromUri(Uri uri) method
it is used to return a Bitmap which is why it is returned such as
return BitmapFactory.decodeStream(getContentResolver().openInputStream(uri), null, opts);
but it is also called in the method without returning or assigning it to anything, was this a typo or intentionally?
The text was updated successfully, but these errors were encountered: