Package net.sf.jasperreports.engine.util
Class JRImageLoader
java.lang.Object
net.sf.jasperreports.engine.util.JRImageLoader
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
Configuration property specifying the name of the class implementing theJRImageEncoder
interface to be used by the engine.static final String
Configuration property specifying the name of the class implementing theJRImageReader
interface to be used by the engine.static final String
-
Method Summary
Modifier and TypeMethodDescriptionstatic JRImageLoader
getInstance
(JasperReportsContext jasperReportsContext) loadAwtImageFromBytes
(byte[] bytes) byte[]
loadBytesFromAwtImage
(Image image, ImageTypeEnum imageType) Encoding the image object using an image encoder that supports the supplied image type.
-
Field Details
-
PROPERTY_IMAGE_READER
Configuration property specifying the name of the class implementing theJRImageReader
interface to be used by the engine. If not set, the engine will try to an image reader implementation that corresponds to the JVM version.- See Also:
-
PROPERTY_IMAGE_ENCODER
Configuration property specifying the name of the class implementing theJRImageEncoder
interface to be used by the engine. If not set, the engine will try to an image encoder implementation that corresponds to the JVM version.- See Also:
-
PIXEL_IMAGE_RESOURCE
- See Also:
-
NO_IMAGE_RESOURCE
- See Also:
-
SUBREPORT_IMAGE_RESOURCE
- See Also:
-
CHART_IMAGE_RESOURCE
- See Also:
-
CROSSTAB_IMAGE_RESOURCE
- See Also:
-
COMPONENT_IMAGE_RESOURCE
- See Also:
-
-
Method Details
-
getInstance
-
loadBytesFromAwtImage
Encoding the image object using an image encoder that supports the supplied image type.- Parameters:
image
- the java.awt.Image object to encodeimageType
- the type of the image as specified by one of the constants defined in the ImageTypeEnum- Returns:
- the encoded image data
- Throws:
JRException
-
loadAwtImageFromBytes
- Throws:
JRException
-