android - Crop image as square with picasso -


how can crop image square using picasso library on android?

i need following: cat one , cat two

the following project provides lot of different transformations picasso

https://github.com/wasabeef/picasso-transformations

the 1 interested named cropsquaretransformation , can apply using following code

picasso.with(mcontext)        .load(r.drawable.demo)        .transform(transformation)        .transform(new cropsquaretransformation())        .into(holder.image); 

you add dependency or copy , paste classes need.


Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

android - Unable to generate FCM token from dynamically instantiated Firebase -