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
If we try to load a 200x200 image from a 2000x2000 image, Downsampler will try to retrieve a 2000x2000 image to re-use on KitKat+. We should instead take sample size into account when trying to retrieve a Bitmap. Otherwise our hit rate is quite poor.
It's a little complicated because we can pass any integer sample size to BitmapFactory but it will use some power of two rather than the number we give. BitmapFactory appears to use the nearest power of 2 that is less than or equal to the sample size we provide.
The text was updated successfully, but these errors were encountered:
If we try to load a 200x200 image from a 2000x2000 image, Downsampler will try to retrieve a 2000x2000 image to re-use on KitKat+. We should instead take sample size into account when trying to retrieve a Bitmap. Otherwise our hit rate is quite poor.
It's a little complicated because we can pass any integer sample size to BitmapFactory but it will use some power of two rather than the number we give. BitmapFactory appears to use the nearest power of 2 that is less than or equal to the sample size we provide.
The text was updated successfully, but these errors were encountered: