diff options
author | ByteHamster <info@bytehamster.com> | 2020-03-16 18:44:10 +0100 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2020-03-16 18:44:10 +0100 |
commit | cfe74eee266fc1d7a2b98102adc087b3ed4147f2 (patch) | |
tree | 33e5c4365a68c58a778734a827b2a8a5d343a98c /core/src | |
parent | c0a688ce5412586713e56c892b87d8b75884fc81 (diff) | |
download | AntennaPod-cfe74eee266fc1d7a2b98102adc087b3ed4147f2.zip |
Fixed blurring images on Android 4.4
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/glide/FastBlurTransformation.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/glide/FastBlurTransformation.java b/core/src/main/java/de/danoeh/antennapod/core/glide/FastBlurTransformation.java index d2d9e5947..41f7c2cb8 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/glide/FastBlurTransformation.java +++ b/core/src/main/java/de/danoeh/antennapod/core/glide/FastBlurTransformation.java @@ -22,7 +22,9 @@ public class FastBlurTransformation extends BitmapTransformation { @Override protected Bitmap transform(BitmapPool pool, Bitmap source, int outWidth, int outHeight) { - Bitmap resized = ThumbnailUtils.extractThumbnail(source, outWidth / 3, outHeight / 3); + int targetWidth = outWidth / 3; + int targetHeight = (int) (1.0 * outHeight * targetWidth / outWidth); + Bitmap resized = ThumbnailUtils.extractThumbnail(source, targetWidth, targetHeight); Bitmap result = fastBlur(resized, STACK_BLUR_RADIUS); if (result == null) { Log.w(TAG, "result was null"); |