Class ImageConverterBuffered2Rendered
- java.lang.Object
-
- org.apache.xmlgraphics.image.loader.impl.AbstractImageConverter
-
- org.apache.xmlgraphics.image.loader.impl.ImageConverterBuffered2Rendered
-
- All Implemented Interfaces:
ImageConverter
public class ImageConverterBuffered2Rendered extends AbstractImageConverter
This ImageConverter converts BufferedImages to RenderedImages (well, it's basically just a class cast).
-
-
Field Summary
-
Fields inherited from interface org.apache.xmlgraphics.image.loader.spi.ImageConverter
MEDIUM_CONVERSION_PENALTY, MINIMAL_CONVERSION_PENALTY, NO_CONVERSION_PENALTY
-
-
Constructor Summary
Constructors Constructor Description ImageConverterBuffered2Rendered()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Imageconvert(Image src, java.util.Map hints)Converts an image into a different representation.intgetConversionPenalty()Returns the conversion penalty for the conversion that this implementation supports.ImageFlavorgetSourceFlavor()Returns the flavor that this converter expects.ImageFlavorgetTargetFlavor()Returns the flavor that this converter converts images into.-
Methods inherited from class org.apache.xmlgraphics.image.loader.impl.AbstractImageConverter
checkSourceFlavor
-
-
-
-
Method Detail
-
convert
public Image convert(Image src, java.util.Map hints)
Converts an image into a different representation.Consumers can get the effective MIME type (if any) from the associated
ImageFlavor.- Parameters:
src- the source imagehints- the conversion hints- Returns:
- the converted image
-
getSourceFlavor
public ImageFlavor getSourceFlavor()
Returns the flavor that this converter expects.- Returns:
- the source flavor
-
getTargetFlavor
public ImageFlavor getTargetFlavor()
Returns the flavor that this converter converts images into.- Returns:
- the target flavor
-
getConversionPenalty
public int getConversionPenalty()
Returns the conversion penalty for the conversion that this implementation supports.- Specified by:
getConversionPenaltyin interfaceImageConverter- Overrides:
getConversionPenaltyin classAbstractImageConverter- Returns:
- the conversion penalty (must be a non-negative integer)
-
-