public class JAIMonochromeBitmapConverter extends java.lang.Object implements MonochromeBitmapConverter
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 and Description |
---|
JAIMonochromeBitmapConverter() |
Modifier and Type | Method and Description |
---|---|
java.awt.image.RenderedImage |
convertToMonochrome(java.awt.image.BufferedImage img)
Converts a 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
|
public void setHint(java.lang.String name, java.lang.String value)
setHint
in interface MonochromeBitmapConverter
name
- the name of the hintvalue
- the valuepublic java.awt.image.RenderedImage convertToMonochrome(java.awt.image.BufferedImage img)
convertToMonochrome
in interface MonochromeBitmapConverter
img
- the original imageCopyright 1999-2017 The Apache Software Foundation. All Rights Reserved.