diff options
author | Manuel Mall <manuel@apache.org> | 2006-01-07 13:15:53 +0000 |
---|---|---|
committer | Manuel Mall <manuel@apache.org> | 2006-01-07 13:15:53 +0000 |
commit | 8faab42c21e565d859e8caa0c56df1c2a8748dea (patch) | |
tree | 998c86d83823706d64f5af8b7cca548f22ec6da8 /src/java/org/apache/fop/image | |
parent | 5c359c10e6131572e46745dfe46c4c556e361ea0 (diff) | |
download | xmlgraphics-fop-8faab42c21e565d859e8caa0c56df1c2a8748dea.tar.gz xmlgraphics-fop-8faab42c21e565d859e8caa0c56df1c2a8748dea.zip |
Added support for relative font config URLs (metrics-url and embed-url). These URLs are now resolved through the FOP config URI resolver. A new configuration item font-base has been added which defines the base URL to be used for resolution of the font URLs. If it is not given the normal FOP base URL is used. Unrelated to this feature the patch also contains a new image class (java 1.4 specific) for JPEG images. This is for renderers (e.g. AFP) which require access to the decoded JPEG.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@366718 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/image')
-rw-r--r-- | src/java/org/apache/fop/image/ImageFactory.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/java/org/apache/fop/image/ImageFactory.java b/src/java/org/apache/fop/image/ImageFactory.java index d7b73c372..e41ceb858 100644 --- a/src/java/org/apache/fop/image/ImageFactory.java +++ b/src/java/org/apache/fop/image/ImageFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 1999-2005 The Apache Software Foundation. + * Copyright 1999-2006 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -66,6 +66,8 @@ public final class ImageFactory { "ImageIOImage", "org.apache.fop.image.ImageIOImage"); ImageProvider gifImage = new ImageProvider("GIFImage", "org.apache.fop.image.GifImage"); ImageProvider jpegImage = new ImageProvider("JPEGImage", "org.apache.fop.image.JpegImage"); + ImageProvider jpegImageIOImage = new ImageProvider( + "JPEGImage", "org.apache.fop.image.JpegImageIOImage"); ImageProvider bmpImage = new ImageProvider("BMPImage", "org.apache.fop.image.BmpImage"); ImageProvider epsImage = new ImageProvider("EPSImage", "org.apache.fop.image.EPSImage"); ImageProvider pngImage = new ImageProvider("PNGImage", "org.apache.fop.image.PNGImage"); @@ -82,6 +84,7 @@ public final class ImageFactory { imt = new ImageMimeType("image/jpeg"); imageMimeTypes.put(imt.getMimeType(), imt); + imt.addProvider(jpegImageIOImage); imt.addProvider(jpegImage); imt = new ImageMimeType("image/bmp"); @@ -244,16 +247,14 @@ public final class ImageFactory { } catch (Exception e) { log.debug("Error closing the InputStream for the image", e); } - log.error("No ImageReader for this type of image (" - + href + ")"); + log.error("No ImageReader for this type of image (" + href + ")"); return null; } // Associate mime-type to FopImage class String imgMimeType = imgInfo.mimeType; Class imageClass = getImageClass(imgMimeType); if (imageClass == null) { - log.error("Unsupported image type (" - + href + "): " + imgMimeType); + log.error("Unsupported image type (" + href + "): " + imgMimeType); return null; } else { if (log.isDebugEnabled()) { @@ -294,8 +295,7 @@ public final class ImageFactory { return null; } if (!(imageInstance instanceof org.apache.fop.image.FopImage)) { - log.error("Error creating FopImage object (" - + href + "): " + "class " + log.error("Error creating FopImage object (" + href + "): " + "class " + imageClass.getName() + " doesn't implement org.apache.fop.image.FopImage interface"); return null; |