-
-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rounding issue in setupInternalCanvasMatrix() #128
Comments
This might result in a slightly vertically stretched/squeezed image depending on the |
Also in the above case:
This gives a Running |
I'm not sure what to do here TBH. |
Alternative approach would be to scale by |
Hi,
I also wasn't able to use the solution with calculating the real rounding factor from rootView.getHeight(). It caused problems when rootView height is much more than blurView height. For example, nonRoundingScaleFactorHeight was 32 while scaleFactor was near 4.5 (don't remember exact number) for the case where rootView height is 1152 but blurView height is 96 pixels. As a result, my item wasn't blurred at all. |
@Mickey34 |
Version 1.6.5
There's a problem in
setupInternalCanvasMatrix()
where a rounding issue can occur causinginternalCanvas
androotView
sizes to not match. This leads to some blurring issues at the bottom ofBlurView
.This is down to using
roundingScaleFactor
duringinternalCanvas.scale()
for height instead of the 'real' height scale factor.I've fixed on my side by producing:
float nonRoundingScaleFactorHeight = (float) rootView.getHeight() / internalCanvas.getHeight();
and using that for scaling:
internalCanvas.scale(1 / scaleFactor, 1 / nonRoundingScaleFactorHeight);
It might be worth looking into.
The text was updated successfully, but these errors were encountered: