ImageConverter
public class ImageConverterG2D2Bitmap extends AbstractImageConverter
MEDIUM_CONVERSION_PENALTY, MINIMAL_CONVERSION_PENALTY, NO_CONVERSION_PENALTY
Constructor | Description |
---|---|
ImageConverterG2D2Bitmap() |
Modifier and Type | Method | Description |
---|---|---|
Image |
convert(Image src,
java.util.Map hints) |
Converts an image into a different representation.
|
ImageFlavor |
getSourceFlavor() |
Returns the flavor that this converter expects.
|
ImageFlavor |
getTargetFlavor() |
Returns the flavor that this converter converts images into.
|
protected java.awt.image.BufferedImage |
paintToBufferedImage(ImageGraphics2D g2dImage,
int bitsPerPixel,
boolean withAlpha,
int resolution) |
Paints a Graphics2D image on a BufferedImage and returns this bitmap.
|
protected void |
setRenderingHintsForBufferedImage(java.awt.Graphics2D g2d) |
Sets rendering hints on the Graphics2D created for painting to a BufferedImage.
|
checkSourceFlavor, getConversionPenalty
public Image convert(Image src, java.util.Map hints)
Consumers can get the effective MIME type (if any) from the
associated ImageFlavor
.
src
- the source imagehints
- the conversion hintsprotected java.awt.image.BufferedImage paintToBufferedImage(ImageGraphics2D g2dImage, int bitsPerPixel, boolean withAlpha, int resolution)
g2dImage
- the Graphics2D imagebitsPerPixel
- the desired number of bits per pixel (supported: 1, 8, 24)withAlpha
- true if the generated image should have an alpha channelresolution
- the requested bitmap resolutionprotected void setRenderingHintsForBufferedImage(java.awt.Graphics2D g2d)
g2d
- the Graphics2D instancepublic ImageFlavor getSourceFlavor()
public ImageFlavor getTargetFlavor()
Copyright 1999-2016 The Apache Software Foundation. All Rights Reserved.