问题
I am downloading low resolution pictures from web by using Picasso and displaying it in high res displays. Fetching images is straightforward:
Picasso.with(context)
.load(item.getPicture())
.transform(new BitmapTransformations.OverlayTransformation(
context.getResources(), R.drawable.ic_play_video))
.error(R.drawable.picture_placeholder)
.into(target);
Notice that I apply Overlay transformation into request - It's a high quality image asset I put on top of downloaded image. Applying overlay is also simple - just resize bitmap and put it in the center of image. But here comes the problem: Unless I add resizing, in my case:
.fit().centerCrop();
into Picasso request, overlaid high-res asset is copying quality of downloaded image (first picture). When I add this resizing before transformation the overlay looks as expected (second picture). Can anyone explain to me why this happens? Thanks you!


来源:https://stackoverflow.com/questions/26416004/picasso-transformation-bitmap-quality