/** * Returns an ImageInfo object containing its intrinsic size for a given URI. The ImageInfo * is retrieved from an image cache if it has been requested before. * @param uri the URI of the image * @param session the session context through which to resolve the URI if the image is not in * the cache * @return the ImageInfo object created from the image * @throws ImageException If no suitable ImagePreloader can be found to load the image or * if an error occurred while preloading the image. * @throws IOException If an I/O error occurs while preloading the image */ public ImageInfo getImageInfo(String uri, ImageSessionContext session) throws ImageException, IOException { if (getCache() != null) { return getCache().needImageInfo(uri, session, this); } else { return preloadImage(uri, session); } }