(FopImage) m_urlMap.get(absoluteURL.toString());
if (imageObject != null)
return imageObject;
// If not, check image type
ImageReader imgReader = null;
try {
if (imgIS == null) {
imgIS = absoluteURL.openStream();
}
imgReader = ImageReaderFactory.Make(absoluteURL.toExternalForm(), imgIS);
} catch (Exception e) {
throw new FopImageException(
"Error while recovering Image Informations (" +
absoluteURL.toString() + ") : " + e.getMessage());
}
finally { if (imgIS != null) {
try {
imgIS.close();
} catch (IOException e) {}
}
} if (imgReader == null)
throw new FopImageException(
"No ImageReader for this type of image (" +
absoluteURL.toString() + ")");
// Associate mime-type to FopImage class
String imgMimeType = imgReader.getMimeType();
String imgClassName = null;
if ("image/gif".equals(imgMimeType)) {
imgClassName = "org.apache.fop.image.GifJpegImage";
// imgClassName = "org.apache.fop.image.JAIImage";
} else if ("image/jpeg".equals(imgMimeType)) {