[英]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.