aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/image/BmpImage.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/fop/image/BmpImage.java')
-rw-r--r--src/java/org/apache/fop/image/BmpImage.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/java/org/apache/fop/image/BmpImage.java b/src/java/org/apache/fop/image/BmpImage.java
index 4e724af3e..0e8655179 100644
--- a/src/java/org/apache/fop/image/BmpImage.java
+++ b/src/java/org/apache/fop/image/BmpImage.java
@@ -55,7 +55,7 @@ import java.io.IOException;
import java.awt.color.ColorSpace;
// FOP
-import org.apache.fop.apps.FOUserAgent;
+import org.apache.avalon.framework.logger.Logger;
/**
* Bitmap image.
@@ -82,7 +82,7 @@ public class BmpImage extends AbstractFopImage {
* @param ua the user agent
* @return true if it was loaded successfully
*/
- protected boolean loadBitmap(FOUserAgent ua) {
+ protected boolean loadBitmap(Logger logger) {
int wpos = 18;
int hpos = 22; // offset positioning for w and height in bmp files
int[] headermap = new int[54];
@@ -120,7 +120,7 @@ public class BmpImage extends AbstractFopImage {
}
}
} catch (IOException e) {
- ua.getLogger().error("Error while loading image "
+ logger.error("Error while loading image "
+ "" + " : "
+ e.getClass() + " - "
+ e.getMessage(), e);
@@ -150,9 +150,9 @@ public class BmpImage extends AbstractFopImage {
} else if (this.bitsPerPixel == 4 || this.bitsPerPixel == 8) {
bytes = this.width / (8 / this.bitsPerPixel);
} else {
- ua.getLogger().error("Image (" + ""
- + ") has " + this.bitsPerPixel
- + " which is not a supported BMP format.");
+ logger.error("Image (" + ""
+ + ") has " + this.bitsPerPixel
+ + " which is not a supported BMP format.");
return false;
}
if ((bytes & 0x03) != 0) {
@@ -175,10 +175,10 @@ public class BmpImage extends AbstractFopImage {
inputStream.close();
inputStream = null;
} catch (IOException e) {
- ua.getLogger().error("Error while loading image "
- + "" + " : "
- + e.getClass() + " - "
- + e.getMessage(), e);
+ logger.error("Error while loading image "
+ + "" + " : "
+ + e.getClass() + " - "
+ + e.getMessage(), e);
return false;
}