[英]How to use Picasso library to crop a picture not from the middle but from the top?
有一個方法cropCentre()
-在中間進行cropCentre()
。 那么,有沒有類似的方法,例如topCentre()
?
您總是可以對獲取的Bitmap
應用自定義轉換:
Picasso.with(context).load(uri).transform(new Transformation() {
@Override
public Bitmap transform(Bitmap source) {
///Do what you want with bitmap
return source;
}
@Override
public String key() {
return null;
}
}).into(imageView);
Picasso擴展picasso-transformations應該具有您需要的轉換: picasso Transformations
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.