Picasso Image Library - poor quality while maintaining aspect ratio and image size

I am using the Picasso image library , but there seems to be one missing feature. I want to be able to display images that support the original aspect ratio, but reducing the quality so that the bitmap in the memory is small enough to be controlled.

I see the methods fit()and resize(); however, I don’t think that any of them is suitable for loading images into a custom ImageView that scales to the size of the image (with maximum width). - fit()Useless, as the custom ImageView should resize the image, and not vice versa.

I need a way to specify which inSampleSize is used, or, even better, the maximum width for loading the image, which takes into account the aspect ratio.

Is there any way to do this, except to change the source myself?

+4
source share

Source: https://habr.com/ru/post/1537735/


All Articles