Skip to content
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

artifacts at the edge of the view #7

Open
ianduke opened this issue Jun 12, 2015 · 6 comments
Open

artifacts at the edge of the view #7

ianduke opened this issue Jun 12, 2015 · 6 comments

Comments

@ianduke
Copy link

ianduke commented Jun 12, 2015

First, thanks for this great library!

I'm using your BlurringView to blur a full screen image in my app, but I'm getting artifacts at the edge of the screen where the image isn't blurred. I read in your blog post that you added the lines:

scaledWidth = scaledWidth - (scaledWidth % 4) + 4;
scaledHeight = scaledHeight - (scaledHeight % 4) + 4;

to remove artifacts at the edges of the view, but for me, removing those two lines removed the artifacts. Is it safe to remove those lines? Do the artifacts depend on the image, the device, the downsample factor, or the blurring radius?

@molikto
Copy link

molikto commented Jun 19, 2015

I always experienced the same thing from Renderscript (not this project) and never really solved it. What I do usually is just blur a bigger bitmap, so the artifacts will not be visible. Hope this repo can solve it, because my method is not useful anymore

@luojun
Copy link
Contributor

luojun commented Jun 19, 2015

@ireneduke sorry I wasn't able to get back to you earlier. One thing to look into could be the version of Android or RenderScript. Those lines were there to mitigate the effect of what's supposedly a bug in RenderScript. Maybe that's fixed in more recent versions?

But I didn't dig deep enough about how the various factors interact. I would suspect that image size and downsample factor would matter in terms of how the edge of the original image is trimmed. Device could matter in terms of the version of RenderScript. And I suspect blurring radius doesn't matter.

@ndbroadbent
Copy link

+1, I've noticed that this happening for me (when using react-native-blur.)

Also, sorry for commenting on such an old issue. But maybe if this is fixed in later versions of RenderScript, then it would be great to update the code for that. These days, I think it's safe to have a renderscriptTargetApi of 23. (That's what we are recommending for react-native-blur.)

You can see it happening at the right edge:

screenshot 2017-04-16 00 15 17

If this project is dead, then I think I might just copy the code into our own repo and change it there. But if someone from 500px reads this, please let me know if you would consider merging a PR and releasing a new version.

@lihongxiangleo
Copy link

How to solve this problem T T @ndbroadbent

@Peretz30
Copy link

any updates?

@mck182
Copy link
Contributor

mck182 commented Apr 20, 2020

Hi all,

sorry for the late response - this project is not really maintained anymore as we've since redesigned our app and this component is no longer used.

We appreciate your interest in this library and with that said, feel free to submit a PR and I'll see what we can do to get it in.

Cheers,
Martin from 500px

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

7 participants