aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2004-08-16 19:29:04 +0000
committerJeremias Maerki <jeremias@apache.org>2004-08-16 19:29:04 +0000
commitea2b946c0ebb9af97ecbe20fec2d52b48cc8d3b6 (patch)
tree886682e7b2a529c28a391c8258a791db7d52c979 /src/java/org/apache
parentef27724bbbd6c61e279cdece71f31c8444754d22 (diff)
downloadxmlgraphics-fop-ea2b946c0ebb9af97ecbe20fec2d52b48cc8d3b6.tar.gz
xmlgraphics-fop-ea2b946c0ebb9af97ecbe20fec2d52b48cc8d3b6.zip
Fix implementations after logging changes to correspond to the interface again.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197879 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache')
-rw-r--r--src/java/org/apache/fop/image/BmpImage.java8
-rw-r--r--src/java/org/apache/fop/image/JimiImage.java12
-rw-r--r--src/java/org/apache/fop/image/JpegImage.java15
3 files changed, 17 insertions, 18 deletions
diff --git a/src/java/org/apache/fop/image/BmpImage.java b/src/java/org/apache/fop/image/BmpImage.java
index c3bbea192..50312a5e7 100644
--- a/src/java/org/apache/fop/image/BmpImage.java
+++ b/src/java/org/apache/fop/image/BmpImage.java
@@ -50,7 +50,7 @@ public class BmpImage extends AbstractFopImage {
* @param ua the user agent
* @return true if it was loaded successfully
*/
- protected boolean loadBitmap(Log logger) {
+ protected boolean loadBitmap() {
int wpos = 18;
int hpos = 22; // offset positioning for w and height in bmp files
int[] headermap = new int[54];
@@ -88,7 +88,7 @@ public class BmpImage extends AbstractFopImage {
}
}
} catch (IOException e) {
- logger.error("Error while loading image "
+ log.error("Error while loading image "
+ "" + " : "
+ e.getClass() + " - "
+ e.getMessage(), e);
@@ -118,7 +118,7 @@ public class BmpImage extends AbstractFopImage {
} else if (this.bitsPerPixel == 4 || this.bitsPerPixel == 8) {
bytes = this.width / (8 / this.bitsPerPixel);
} else {
- logger.error("Image (" + ""
+ log.error("Image (" + ""
+ ") has " + this.bitsPerPixel
+ " which is not a supported BMP format.");
return false;
@@ -143,7 +143,7 @@ public class BmpImage extends AbstractFopImage {
inputStream.close();
inputStream = null;
} catch (IOException e) {
- logger.error("Error while loading image "
+ log.error("Error while loading image "
+ "" + " : "
+ e.getClass() + " - "
+ e.getMessage(), e);
diff --git a/src/java/org/apache/fop/image/JimiImage.java b/src/java/org/apache/fop/image/JimiImage.java
index ab07e8ecf..cefeac17e 100644
--- a/src/java/org/apache/fop/image/JimiImage.java
+++ b/src/java/org/apache/fop/image/JimiImage.java
@@ -48,26 +48,26 @@ public class JimiImage extends AbstractFopImage {
}
}
- protected boolean loadDimensions(Log logger) {
+ protected boolean loadDimensions() {
if (this.bitmaps == null) {
- loadImage(logger);
+ loadImage();
}
return this.bitmaps != null;
}
/**
- * @see org.apache.fop.image.AbstractFopImage#loadBitmap(Logger)
+ * @see org.apache.fop.image.AbstractFopImage#loadBitmap()
*/
- protected boolean loadBitmap(Log logger) {
+ protected boolean loadBitmap() {
if (this.bitmaps == null) {
- loadImage(logger);
+ loadImage();
}
return this.bitmaps != null;
}
- protected void loadImage(Log log) {
+ protected void loadImage() {
int[] tmpMap = null;
try {
ImageProducer ip =
diff --git a/src/java/org/apache/fop/image/JpegImage.java b/src/java/org/apache/fop/image/JpegImage.java
index 3ce3ed13e..4de79fbba 100644
--- a/src/java/org/apache/fop/image/JpegImage.java
+++ b/src/java/org/apache/fop/image/JpegImage.java
@@ -52,10 +52,9 @@ public class JpegImage extends AbstractFopImage {
* This loads the original jpeg data and reads the color space,
* and icc profile if any.
*
- * @param ua the user agent
* @return true if loaded false for any error
*/
- protected boolean loadOriginalData(Log logger) {
+ protected boolean loadOriginalData() {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ByteArrayOutputStream iccStream = new ByteArrayOutputStream();
int index = 0;
@@ -70,7 +69,7 @@ public class JpegImage extends AbstractFopImage {
inputStream.close();
inputStream = null;
} catch (java.io.IOException ex) {
- logger.error("Error while loading image "
+ log.error("Error while loading image "
+ " : " + ex.getClass()
+ " - " + ex.getMessage(), ex);
return false;
@@ -115,7 +114,7 @@ public class JpegImage extends AbstractFopImage {
*/
this.colorSpace = CMYKColorSpace.getInstance();
} else {
- logger.error("Unknown ColorSpace for image: "
+ log.error("Unknown ColorSpace for image: "
+ "");
return false;
}
@@ -157,7 +156,7 @@ public class JpegImage extends AbstractFopImage {
}
}
} else {
- logger.error("Error while loading "
+ log.error("Error while loading "
+ "JpegImage - Invalid JPEG Header.");
return false;
}
@@ -166,7 +165,7 @@ public class JpegImage extends AbstractFopImage {
try {
iccStream.write(align);
} catch (Exception e) {
- logger.error("Error while loading image "
+ log.error("Error while loading image "
+ " : "
+ e.getMessage(), e);
return false;
@@ -174,11 +173,11 @@ public class JpegImage extends AbstractFopImage {
try {
iccProfile = ICC_Profile.getInstance(iccStream.toByteArray());
} catch (Exception e) {
- logger.error("Invalid ICC profile: " + e, e);
+ log.error("Invalid ICC profile: " + e, e);
return false;
}
} else if (this.colorSpace == null) {
- logger.error("ColorSpace not specified for JPEG image");
+ log.error("ColorSpace not specified for JPEG image");
return false;
}
return true;