public static BufferedImage getImageForSize ( JinxConstants . PhotoSize size , PhotoInfo info ) throws JinxException { if ( info == null || size == null ) { throw new JinxException ( "Cannot look up null photo or size." ) ; } BufferedImage image ; try { image = ImageIO . read ( getUrlForSize ( size , info ) ) ; } catch ( JinxException je ) { throw je ; } catch ( Exception e ) { throw new JinxException ( "Unable to get image for size " + size . toString ( ) , e ) ; } return image ; }
Get an image for photo info at a specific size .