Class JRImageLoader


  • public final class JRImageLoader
    extends Object
    Author:
    Teodor Danciu (teodord@users.sourceforge.net)
    • 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
    • Method Detail

      • 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 ImageTypeEnum
        Returns:
        the encoded image data
        Throws:
        JRException