public class ImageConverterG2D2Bitmap extends AbstractImageConverter
MEDIUM_CONVERSION_PENALTY, MINIMAL_CONVERSION_PENALTY, NO_CONVERSION_PENALTY| Constructor and Description |
|---|
ImageConverterG2D2Bitmap() |
| Modifier and Type | Method and Description |
|---|---|
Image |
convert(Image src,
java.util.Map<java.lang.String,java.lang.Object> 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,
boolean cmyk)
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, getConversionPenaltypublic Image convert(Image src, java.util.Map<java.lang.String,java.lang.Object> 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, boolean cmyk)
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-2025 The Apache Software Foundation. All Rights Reserved.