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

Blurring bitmap #1613

Closed
Yura-Yaskevich opened this issue Nov 24, 2016 · 3 comments
Closed

Blurring bitmap #1613

Yura-Yaskevich opened this issue Nov 24, 2016 · 3 comments
Labels

Comments

@Yura-Yaskevich
Copy link

Can you help me
I use GLIDE and want to make blur transformation
how cant i pass bitmap for transformation

@TWiStErRob
Copy link
Collaborator

Where did you get the bitmap from?

@Yura-Yaskevich
Copy link
Author

Yura-Yaskevich commented Nov 25, 2016

I am trying to blur screen background, I make screenshot and result bitmap trying to load with GLIDE

View view = getActivity().getWindow().getDecorView().getRootView();
        Bitmap b = Bitmap.createBitmap(view.getWidth(), view.getHeight(), Bitmap.Config.ARGB_8888);
        Canvas c = new Canvas(b);
        view.draw(c);

@TWiStErRob
Copy link
Collaborator

TWiStErRob commented Nov 25, 2016

If you got the Bitmap from another source you could have done something like http://stackoverflow.com/a/31940058/253468, but since it's a View that's on-screen, you need to render it from the UI thread.

Look around #122 for trick how to squeeze a Bitmap through Glide, or consider alternatives, since in this case Glide doesn't provide you more than doing the blur in the background.

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

No branches or pull requests

2 participants