Start a Project

How to get image width and height with picasso library

In this blog,
I have shown you the how to get the image width and height in Picasso.

Get the width and height

You may get the Bitmap dimensions only after downloading the image. you must use synchronous method call like this:

Synchronous method call like this:

This block of code will give the exception, so don’t forget to put this code in try/catch block.

Or

you can use the Target(this is the better way to get the width and height)

 

 

 

 

Exit mobile version