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

BlurTransform not working sometimes #41

Open
Touchunit opened this issue Apr 2, 2018 · 0 comments
Open

BlurTransform not working sometimes #41

Touchunit opened this issue Apr 2, 2018 · 0 comments

Comments

@Touchunit
Copy link

I can't recognize what is going wrong please help.
My code :

`Picasso.with(PlayScreenActivity.this)
                    .load(uri)
                    .transform(new BlurTransformation(this,25,10))
                    .placeholder(R.drawable.ic_default)
                    .error(R.drawable.ic_default)
                    .into(new Target() {
                        @Override
                        public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) {
                        }

                        @Override
                        public void onBitmapFailed(Drawable errorDrawable) {
                        }

                        @Override
                        public void onPrepareLoad(Drawable placeHolderDrawable) {
                        }
                    });`

See the crashlytic log report

Fatal Exception: java.lang.RuntimeExceptionTransformation BlurTransformation(radius=25, sampling=10) crashed with exception. 

  | com.a.a.c$3.run (BitmapHunter.java:434)
  | android.os.Handler.handleCallback (Handler.java:739)
  | com.android.internal.os.ZygoteInit.main (ZygoteInit.java:779)

Caused by java.lang.IllegalArgumentException width and height must be > 0 
  | android.graphics.Bitmap.createBitmap (Bitmap.java:866)
  | android.graphics.Bitmap.createBitmap (Bitmap.java:812)
  | b.a.a.a.a.a (BlurTransformation.java:58)
  | com.a.a.c.a (BitmapHunter.java:429)
  | com.a.a.c.a (BitmapHunter.java:238)
  | com.a.a.c.run (BitmapHunter.java:159)
  | java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:422)
  | java.lang.Thread.run (Thread.java:818)
  | com.a.a.ah$d.run (Utils.java:411)

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

No branches or pull requests

1 participant