How to use transform method in picasso to avoid the oom issue

Updated 22 December 2016

Save

In this blog,
We are going to tell you how to cure the out of memory issue while loading the images in Picasso library using transform and resize methods.

If you want to resize the image with aspect ratio and avoid to OOM error then you can use the transform method of Picasso.

How to use Transform method

BitmapTransform

How to use resize method

Transform images to properly adjust into layouts and to overcome the memory.

centerCrop – Scale the image venerate the aspect ratio until it fills the size.

Crop either the top and bottom or left and right so it matches the size exactly.

 

author
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Start a Project


    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home