Package org.apache.fop.util.bitmap
Class JAIMonochromeBitmapConverter
java.lang.Object
org.apache.fop.util.bitmap.JAIMonochromeBitmapConverter
- All Implemented Interfaces:
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.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionConverts a bitmap image to a monochrome (1-bit) b/w bitmap image.void
Sets a hint to the implementation
-
Constructor Details
-
JAIMonochromeBitmapConverter
public JAIMonochromeBitmapConverter()
-
-
Method Details
-
setHint
Sets a hint to the implementation- Specified by:
setHint
in interfaceMonochromeBitmapConverter
- Parameters:
name
- the name of the hintvalue
- the value
-
convertToMonochrome
Converts a bitmap image to a monochrome (1-bit) b/w bitmap image.- Specified by:
convertToMonochrome
in interfaceMonochromeBitmapConverter
- Parameters:
img
- the original image- Returns:
- the converted monochrome image
-