I want to get the width and height from the API URL without download the image.
Asked
Active
Viewed 226 times
0
-
If you use Glide, your question has been answered here: https://stackoverflow.com/a/48554994/11037116 – mohammad fakhraee Oct 17 '22 at 06:21
1 Answers
3
Glide.with(getContext().getApplicationContext())
.asBitmap()
.load(path)
.into(new SimpleTarget<Bitmap>() {
@Override
public void onResourceReady(Bitmap bitmap,
Transition<? super Bitmap> transition) {
int w = bitmap.getWidth();
int h = bitmap.getHeight()
// mImageView.setImageBitmap(bitmap);
}
});

Code Learner.
- 61
- 9