public static int [ ] getImageSize ( InputStream input , int maxWidth , int maxHeight ) throws IOException { int [ ] size = getImageSize ( input ) ; return getNewSize ( size [ 0 ] , size [ 1 ] , maxWidth , maxHeight ) ; }
Returns the possible size of an image from the given input stream ; the returned size does not overcome the specified maximal borders but keeps the ratio of the image . This method closes the given stream .