2

Any idea or suggestion that can be done to detect the images from url is portrait or landscape. I need to display different size if portrait scaletype:fix_center and is landscape scaletype:fixXY.

Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140
micky
  • 235
  • 2
  • 4
  • 16

2 Answers2

0

As long as landscape means wider than taller (and portrait viceversa) it means to read the image into memory and check width and height.

To read image look here: How to display image from URL on Android .

Community
  • 1
  • 1
PeterMmm
  • 24,152
  • 13
  • 73
  • 111
0

You could also use ExifInterface to read EXIF information from the pic (sounds more correct, but PeterMmm's solution may be easier to implement)