net.sf.jasperreports.engine.util
Class JRImageLoader

java.lang.Object
  extended by net.sf.jasperreports.engine.util.JRImageLoader

public final class JRImageLoader
extends Object

Version:
$Id: JRImageLoader.java 5180 2012-03-29 13:23:12Z teodord $
Author:
Teodor Danciu (teodord@users.sourceforge.net)

Field Summary
static String CHART_IMAGE_RESOURCE
           
static String COMPONENT_IMAGE_RESOURCE
           
static String CROSSTAB_IMAGE_RESOURCE
           
static String NO_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
           
 
Method Summary
static JRImageLoader getInstance(JasperReportsContext jasperReportsContext)
           
 Image loadAwtImageFromBytes(byte[] bytes)
           
 byte[] loadBytesFromAwtImage(Image image, byte imageType)
          Deprecated. Replaced by loadBytesFromAwtImage(Image, ImageTypeEnum).
 byte[] loadBytesFromAwtImage(Image image, ImageTypeEnum imageType)
          Encoding the image object using an image encoder that supports the supplied image type.
static Image loadImage(byte[] bytes)
          Deprecated. Replaced by loadAwtImageFromBytes(byte[]).
static byte[] loadImageDataFromAWTImage(Image image, byte imageType)
          Deprecated. Replaced by loadBytesFromAwtImage(Image, byte).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_IMAGE_READER

public static final String PROPERTY_IMAGE_READER
Configuration property specifying the name of the class implementing the 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.

See Also:
Constant Field Values

PROPERTY_IMAGE_ENCODER

public static final String PROPERTY_IMAGE_ENCODER
Configuration property specifying the name of the class implementing the 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.

See Also:
Constant Field Values

NO_IMAGE_RESOURCE

public static final String NO_IMAGE_RESOURCE
See Also:
Constant Field Values

SUBREPORT_IMAGE_RESOURCE

public static final String SUBREPORT_IMAGE_RESOURCE
See Also:
Constant Field Values

CHART_IMAGE_RESOURCE

public static final String CHART_IMAGE_RESOURCE
See Also:
Constant Field Values

CROSSTAB_IMAGE_RESOURCE

public static final String CROSSTAB_IMAGE_RESOURCE
See Also:
Constant Field Values

COMPONENT_IMAGE_RESOURCE

public static final String COMPONENT_IMAGE_RESOURCE
See Also:
Constant Field Values
Method Detail

getInstance

public static JRImageLoader getInstance(JasperReportsContext jasperReportsContext)

loadBytesFromAwtImage

public byte[] loadBytesFromAwtImage(Image image,
                                    byte imageType)
                             throws JRException
Deprecated. Replaced by loadBytesFromAwtImage(Image, ImageTypeEnum).

Throws:
JRException

loadBytesFromAwtImage

public byte[] loadBytesFromAwtImage(Image image,
                                    ImageTypeEnum imageType)
                             throws JRException
Encoding the image object using an image encoder that supports the supplied image type.

Parameters:
image - the java.awt.Image object to encode
imageType - the type of the image as specified by one of the constants defined in the JRRenderable interface
Returns:
the encoded image data
Throws:
JRException

loadAwtImageFromBytes

public Image loadAwtImageFromBytes(byte[] bytes)
                            throws JRException
Throws:
JRException

loadImageDataFromAWTImage

public static byte[] loadImageDataFromAWTImage(Image image,
                                               byte imageType)
                                        throws JRException
Deprecated. Replaced by loadBytesFromAwtImage(Image, byte).

Throws:
JRException

loadImage

public static Image loadImage(byte[] bytes)
                       throws JRException
Deprecated. Replaced by loadAwtImageFromBytes(byte[]).

Throws:
JRException


Copyright © 2012. All Rights Reserved.