diff options
author | Jeremias Maerki <jeremias@apache.org> | 2008-02-01 14:58:30 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2008-02-01 14:58:30 +0000 |
commit | c4f0551dbf87d84fe955565231f6195d418b46a4 (patch) | |
tree | e51670446e8572f4a4f64bd6ff1506ce92fe0648 /src/java/org/apache/fop/render | |
parent | 7fd5394fe63a571ed2526c93053c64e3dc71536a (diff) | |
download | xmlgraphics-fop-c4f0551dbf87d84fe955565231f6195d418b46a4.tar.gz xmlgraphics-fop-c4f0551dbf87d84fe955565231f6195d418b46a4.zip |
AlphaRasterImage now knows how to deal with TYPE_INT Rasters.
Streamlined image handling in Graphics2D.
Support natively handling CCITT images in SVG images.
Add fallback to device RGB if sRGB isn't set up as the default color space in PDF.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@617512 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render')
-rw-r--r-- | src/java/org/apache/fop/render/pdf/AbstractImageAdapter.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/render/pdf/AbstractImageAdapter.java b/src/java/org/apache/fop/render/pdf/AbstractImageAdapter.java index cd80a6797..d9fd614cc 100644 --- a/src/java/org/apache/fop/render/pdf/AbstractImageAdapter.java +++ b/src/java/org/apache/fop/render/pdf/AbstractImageAdapter.java @@ -59,6 +59,9 @@ public abstract class AbstractImageAdapter implements PDFImage { public AbstractImageAdapter(Image image, String key) { this.image = image; this.key = key; + if (log.isDebugEnabled()) { + log.debug("New ImageAdapter created for key: " + key); + } } /** {@inheritDoc} */ @@ -96,11 +99,16 @@ public abstract class AbstractImageAdapter implements PDFImage { pdfICCStream = cs.getICCStream(); } } else { - if (cs == null && "sRGB".equals(desc)) { + if (cs == null && desc.startsWith("sRGB")) { //It's the default sRGB profile which we mapped to DefaultRGB in PDFRenderer cs = doc.getResources().getColorSpace("DefaultRGB"); } - pdfICCStream = cs.getICCStream(); + if (cs != null) { + pdfICCStream = cs.getICCStream(); + } else { + //DefaultRGB hasn't been mapped to sRGB + //(that's the case with a plain PDFGraphics2D) + } } } if (doc.getProfile().getPDFAMode().isPDFA1LevelB()) { |