wasabeef / picasso-transformations

An Android transformation library providing a variety of image transformations for Picasso
Apache License 2.0
1.69k stars 238 forks source link

how to add Blur Effect using Kotlin #43

Open AgungLaksana opened 5 years ago

AgungLaksana commented 5 years ago

I am sorry if this is trivial, but I am a beginner. and currently I am using Kotlin. I want to blur my image after downloading using picasso.

and here is the code I use:

Picasso.get()
            .load(currentEvent.posterDownloadPath)
            .transform(BlurTransformation(25,3))
            .into(recommendedEventViewHolder.blurryImageView)

but unfortunately I have error like in this image: https://i.stack.imgur.com/Nvq53.png

so how to properly use BlurTransformation effect ?

AgungLaksana commented 5 years ago

I finally find out why I still have the error, i.stack.imgur.com/uyEoF.png . previously I add wasabeef transformation for GLIDE, and when I choose the wrong BlurTransformation class, I choose glide instead of Picasso. problem solved, thanks