public final class JRImageLoader extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CHART_IMAGE_RESOURCE |
static String |
COMPONENT_IMAGE_RESOURCE |
static String |
CROSSTAB_IMAGE_RESOURCE |
static String |
NO_IMAGE_RESOURCE |
static String |
PIXEL_IMAGE_RESOURCE |
static String |
PROPERTY_IMAGE_ENCODER
Configuration property specifying the name of the class implementing the
JRImageEncoder interface
to be used by the engine. |
static String |
PROPERTY_IMAGE_READER
Configuration property specifying the name of the class implementing the
JRImageReader interface
to be used by the engine. |
static String |
SUBREPORT_IMAGE_RESOURCE |
Modifier and Type | Method and Description |
---|---|
static JRImageLoader |
getInstance(JasperReportsContext jasperReportsContext) |
Image |
loadAwtImageFromBytes(byte[] bytes) |
byte[] |
loadBytesFromAwtImage(Image image,
ImageTypeEnum imageType)
Encoding the image object using an image encoder that supports the supplied image type.
|
public static final String PROPERTY_IMAGE_READER
JRImageReader
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.public static final String PROPERTY_IMAGE_ENCODER
JRImageEncoder
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.public static final String PIXEL_IMAGE_RESOURCE
public static final String NO_IMAGE_RESOURCE
public static final String SUBREPORT_IMAGE_RESOURCE
public static final String CHART_IMAGE_RESOURCE
public static final String CROSSTAB_IMAGE_RESOURCE
public static final String COMPONENT_IMAGE_RESOURCE
public static JRImageLoader getInstance(JasperReportsContext jasperReportsContext)
public byte[] loadBytesFromAwtImage(Image image, ImageTypeEnum imageType) throws JRException
image
- the java.awt.Image object to encodeimageType
- the type of the image as specified by one of the constants defined in the JRRenderable interfaceJRException
public Image loadAwtImageFromBytes(byte[] bytes) throws JRException
JRException
Copyright © 2017. All rights reserved.