public final static String ATTRIBUTE_ORIG_DIMENSION = "orig-dimension";
private transient ImageCollectionRenderer renderer = this;
private JComponent makeThumbnailStore(File image, final String key, String mime, Map<String, Serializable> attrs) throws IOException {
String m = _getImageMimeType(image, "r");
Sprite picture = null;
ImageReader r = null;
try {
Map<String, Object> s = Sprite._loadImage(image, false, m, Sprite.MODE_JAVA2D | Sprite.MODE_TILE, _getBufferedType(m), false);
r = (ImageReader) s.get("reader");
picture = new Sprite(image, m, new Dimension(r.getWidth(0), r.getHeight(0)), true);
} catch (Exception ex) {
if (JXAenvUtils._debug) {
ex.printStackTrace();
}
IOException e = new IOException(ex.getMessage());
e.initCause(ex);
throw e;
} finally {
((ImageInputStream) r.getInput()).flush();
r.dispose();
((ImageInputStream) r.getInput()).close();
picture.setStoreMode(Sprite.MODE_JAVA2D | Sprite.MODE_TILE);
return makeThumbnailStore(picture, key, mime, attrs);
}
}