From a5c7059a88a4a9a67bedaf3f49d5aec38f5ba0cd Mon Sep 17 00:00:00 2001 From: Dimezis Date: Mon, 11 Jul 2016 23:04:50 +0200 Subject: [PATCH] Fix unblurred edges glitch --- .../java/eightbitlab/com/blurview/DefaultBlurController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/src/main/java/eightbitlab/com/blurview/DefaultBlurController.java b/library/src/main/java/eightbitlab/com/blurview/DefaultBlurController.java index c74dcaf..9dbc216 100644 --- a/library/src/main/java/eightbitlab/com/blurview/DefaultBlurController.java +++ b/library/src/main/java/eightbitlab/com/blurview/DefaultBlurController.java @@ -167,8 +167,8 @@ private void allocateBitmap(int measuredWidth, int measuredHeight) { int scaledWidth = roundSize(nonRoundedScaledWidth); int scaledHeight = roundSize(nonRoundedScaledHeight); - roundingHeightScaleFactor = (float) scaledHeight / nonRoundedScaledHeight; - roundingWidthScaleFactor = (float) scaledWidth / nonRoundedScaledWidth; + roundingHeightScaleFactor = (float) nonRoundedScaledHeight / scaledHeight; + roundingWidthScaleFactor = (float) nonRoundedScaledWidth / scaledWidth; internalBitmap = Bitmap.createBitmap(scaledWidth, scaledHeight, blurAlgorithm.getSupportedBitmapConfig()); }