Bug:
10495593
We should use the bigger scale factor of the two, and not the smaller.
Change-Id: I5a1ff6fe7d6b50c0128ff17709daa94cef9cb65b
if (mWidth > mDecodeWidth || mHeight > mDecodeHeight) {
int heightRatio = Math.round((float) mHeight / (float) mDecodeHeight);
int widthRatio = Math.round((float) mWidth / (float) mDecodeWidth);
- sampleSize = heightRatio < widthRatio ? heightRatio : widthRatio;
+ sampleSize = Math.max(heightRatio, widthRatio);
}
BitmapFactory.Options opts = new BitmapFactory.Options();