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 -

python - ValueError: No axis named 1 for object type <class 'pandas.core.series.Series'> -

java - How to provide dependency injections in Eclipse RCP 3.x? -