org.apache.fop.render.pcl
Class JAIMonochromeBitmapConverter
java.lang.Object
org.apache.fop.render.pcl.JAIMonochromeBitmapConverter
- All Implemented Interfaces:
- MonochromeBitmapConverter
public class JAIMonochromeBitmapConverter
- extends java.lang.Object
- implements MonochromeBitmapConverter
Implementation of the MonochromeBitmapConverter which uses Java Advanced Imaging (JAI)
to convert grayscale bitmaps to monochrome bitmaps. JAI provides better dithering options
including error diffusion dithering.
If you call setHint("quality", "true") on the instance you can enabled error diffusion
dithering which produces a nicer result but is also a lot slower.
Method Summary |
java.awt.image.RenderedImage |
convertToMonochrome(java.awt.image.BufferedImage img)
Converts a grayscale bitmap image to a monochrome (1-bit) b/w bitmap image. |
void |
setHint(java.lang.String name,
java.lang.String value)
Sets a hint to the implementation |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JAIMonochromeBitmapConverter
public JAIMonochromeBitmapConverter()
setHint
public void setHint(java.lang.String name,
java.lang.String value)
- Description copied from interface:
MonochromeBitmapConverter
- Sets a hint to the implementation
- Specified by:
setHint
in interface MonochromeBitmapConverter
- Parameters:
name
- the name of the hintvalue
- the value- See Also:
MonochromeBitmapConverter.setHint(java.lang.String, java.lang.String)
convertToMonochrome
public java.awt.image.RenderedImage convertToMonochrome(java.awt.image.BufferedImage img)
- Description copied from interface:
MonochromeBitmapConverter
- Converts a grayscale bitmap image to a monochrome (1-bit) b/w bitmap image.
- Specified by:
convertToMonochrome
in interface MonochromeBitmapConverter
- Parameters:
img
- the grayscale image
- Returns:
- the converted monochrome image
- See Also:
MonochromeBitmapConverter.convertToMonochrome(java.awt.image.BufferedImage)
Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.