Package com.reportmill.graphics
Class RMJAIImageReader
java.lang.Object
com.reportmill.graphics.RMJAIImageReader
- All Implemented Interfaces:
RMImageData.ImageReader
-
Constructor Summary
ConstructorsConstructorDescriptionRMJAIImageReader
(RMImageData anImageData) Creates a new image reader for given image data. -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
canRead
(byte[] bytes) Returns whether JAI image reader can read the file provided in the byte array.static boolean
Returns whether JAI image reader can read files with given extension.getImage()
static String
getType
(byte[] bytes) Returns the type of the image bytes provided.static BufferedImage
newBufferedImage
(int width, int height, boolean hasAlpha) void
Reads basic image info.void
Reads basic image info specifically optimized for JPEG images (without having to create Java RenderedImage).void
Loads and sets the decoded bytes for the image data.
-
Constructor Details
-
RMJAIImageReader
Creates a new image reader for given image data.
-
-
Method Details
-
canRead
Returns whether JAI image reader can read files with given extension. -
canRead
public static boolean canRead(byte[] bytes) Returns whether JAI image reader can read the file provided in the byte array. -
getType
Returns the type of the image bytes provided. -
readBasicInfo
public void readBasicInfo()Reads basic image info.- Specified by:
readBasicInfo
in interfaceRMImageData.ImageReader
-
readBasicInfoJPG
public void readBasicInfoJPG()Reads basic image info specifically optimized for JPEG images (without having to create Java RenderedImage). -
readBytesDecoded
public void readBytesDecoded()Loads and sets the decoded bytes for the image data.- Specified by:
readBytesDecoded
in interfaceRMImageData.ImageReader
-
getImage
-
newBufferedImage
-