summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorH. Lehmann <ByteHamster@users.noreply.github.com>2020-03-16 22:35:01 +0100
committerGitHub <noreply@github.com>2020-03-16 22:35:01 +0100
commit1837cdd5767dc1b8caa9eb5d707aecb4645de2fb (patch)
tree30a9e2424a7ff3e2bcb49f6fc113fee96af9656c /core
parent15b1afa38b3ca1614296acc55ecc0535ac39df28 (diff)
parentcfe74eee266fc1d7a2b98102adc087b3ed4147f2 (diff)
downloadAntennaPod-1837cdd5767dc1b8caa9eb5d707aecb4645de2fb.zip
Merge pull request #3934 from ByteHamster/fix-blur
Fixed blurring images on Android 4.4
Diffstat (limited to 'core')
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/glide/FastBlurTransformation.java4
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 bca4b1be8..246ab4e30 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");