aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/render/pdf/FopPDFImage.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/fop/render/pdf/FopPDFImage.java')
-rw-r--r--src/java/org/apache/fop/render/pdf/FopPDFImage.java19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/java/org/apache/fop/render/pdf/FopPDFImage.java b/src/java/org/apache/fop/render/pdf/FopPDFImage.java
index d35204e9e..d1beb0961 100644
--- a/src/java/org/apache/fop/render/pdf/FopPDFImage.java
+++ b/src/java/org/apache/fop/render/pdf/FopPDFImage.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.
@@ -81,12 +81,6 @@ public class FopPDFImage implements PDFImage {
pdfFilter.setApplied(true);
isDCT = true;
- ICC_Profile prof = fopImage.getICCProfile();
- PDFColorSpace pdfCS = toPDFColorSpace(fopImage.getColorSpace());
- if (prof != null) {
- pdfICCStream = doc.getFactory().makePDFICCStream();
- pdfICCStream.setColorSpace(prof, pdfCS);
- }
} else if ("image/tiff".equals(fopImage.getMimeType())
&& fopImage instanceof TIFFImage) {
TIFFImage tiffImage = (TIFFImage) fopImage;
@@ -116,6 +110,12 @@ public class FopPDFImage implements PDFImage {
} else {
fopImage.load(FopImage.BITMAP);
}
+ ICC_Profile prof = fopImage.getICCProfile();
+ PDFColorSpace pdfCS = toPDFColorSpace(fopImage.getColorSpace());
+ if (prof != null) {
+ pdfICCStream = doc.getFactory().makePDFICCStream();
+ pdfICCStream.setColorSpace(prof, pdfCS);
+ }
//Handle transparency mask if applicable
if (fopImage.hasSoftMask()) {
byte [] softMask = fopImage.getSoftMask();
@@ -200,6 +200,11 @@ public class FopPDFImage implements PDFImage {
return softMaskRef;
}
+ /** @return true for CMYK images generated by Adobe Photoshop */
+ public boolean isInverted() {
+ return fopImage.isInverted();
+ }
+
/**
* @see org.apache.fop.pdf.PDFImage#isPS()
*/