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.
            Asked
            
        
        
            Active
            
        
            Viewed 793 times
        
    2
            
            
         
    
    
        Bhargav Rao
        
- 50,140
- 28
- 121
- 140
 
    
    
        micky
        
- 235
- 2
- 4
- 16
2 Answers
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 .
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)
 
    
    
        Adolfo I. C.
        
- 21
- 4
 
    