use of com.toshi.view.custom.CropCircleTransformation in project toshi-android-client by toshiapp.
the class ImageUtil method loadNotificationIcon.
public static Bitmap loadNotificationIcon(final Recipient recipient) throws ExecutionException, InterruptedException {
final RequestManager requestManager = Glide.with(BaseApplication.get());
final DrawableTypeRequest typeRequest = recipient.isGroup() ? requestManager.load(recipient.getGroupAvatar().getBytes()) : requestManager.load(recipient.getUserAvatar());
return (Bitmap) typeRequest.asBitmap().transform(new CropCircleTransformation(BaseApplication.get())).into(200, 200).get();
}
Aggregations