提交 6c85b134 编写于 作者: S Sam Judd

Don't dither when loading RGB_565.

Fixes #412.
上级 59209d88
...@@ -208,9 +208,6 @@ public abstract class Downsampler implements BitmapDecoder<InputStream> { ...@@ -208,9 +208,6 @@ public abstract class Downsampler implements BitmapDecoder<InputStream> {
Bitmap.Config config = getConfig(is, decodeFormat); Bitmap.Config config = getConfig(is, decodeFormat);
options.inSampleSize = sampleSize; options.inSampleSize = sampleSize;
options.inPreferredConfig = config; options.inPreferredConfig = config;
if (options.inPreferredConfig != Bitmap.Config.ARGB_8888) {
options.inDither = true;
}
if ((options.inSampleSize == 1 || Build.VERSION_CODES.KITKAT <= Build.VERSION.SDK_INT) && shouldUsePool(is)) { if ((options.inSampleSize == 1 || Build.VERSION_CODES.KITKAT <= Build.VERSION.SDK_INT) && shouldUsePool(is)) {
int targetWidth = (int) Math.ceil(inWidth / (double) sampleSize); int targetWidth = (int) Math.ceil(inWidth / (double) sampleSize);
int targetHeight = (int) Math.ceil(inHeight / (double) sampleSize); int targetHeight = (int) Math.ceil(inHeight / (double) sampleSize);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册