Class RMImageReader
- java.lang.Object
- 
- com.inductiveautomation.rm.graphics.RMImageReader
 
- 
- All Implemented Interfaces:
- RMImageData.ImageReader
 
 public class RMImageReader extends java.lang.Object implements RMImageData.ImageReader Uses ImageIO or JAI to read an image, its basic info and its decoded bytes. The reader tries to provide basic info without loading the entire image file into memory. Decoded bytes are only needed by things like PDF and Flash writers.
- 
- 
Constructor SummaryConstructors Constructor Description RMImageReader(RMImageData anImageData)Creates a new image reader for given image data.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleancanRead(byte[] bytes)Returns whether image reader can read the file provided in the byte array.static booleancanRead(java.lang.String anExt)Returns whether image reader can read files with given extension.RMImageDatagetImageData()Returns the image data.static java.lang.StringgetType(byte[] bytes)Returns the type of the image bytes provided.voidreadBasicInfo(RMImageData anImageData)Reads basic image info.voidreadBasicInfoJPG()Reads basic image info specifically optimized for JPEG images (without having to create Java RenderedImage).voidreadBytesDecoded()Loads and sets the decoded bytes for the image data.java.awt.image.BufferedImagereadImage(RMImageData anImageData)Reads the buffered image.
 
- 
- 
- 
Constructor Detail- 
RMImageReaderpublic RMImageReader(RMImageData anImageData) Creates a new image reader for given image data.
 
- 
 - 
Method Detail- 
canReadpublic static boolean canRead(java.lang.String anExt) Returns whether image reader can read files with given extension.
 - 
canReadpublic static boolean canRead(byte[] bytes) Returns whether image reader can read the file provided in the byte array.
 - 
getTypepublic static java.lang.String getType(byte[] bytes) Returns the type of the image bytes provided.
 - 
getImageDatapublic RMImageData getImageData() Returns the image data.
 - 
readBasicInfopublic void readBasicInfo(RMImageData anImageData) Reads basic image info.- Specified by:
- readBasicInfoin interface- RMImageData.ImageReader
 
 - 
readBasicInfoJPGpublic void readBasicInfoJPG() Reads basic image info specifically optimized for JPEG images (without having to create Java RenderedImage).
 - 
readImagepublic java.awt.image.BufferedImage readImage(RMImageData anImageData) Reads the buffered image.- Specified by:
- readImagein interface- RMImageData.ImageReader
 
 - 
readBytesDecodedpublic void readBytesDecoded() Loads and sets the decoded bytes for the image data.- Specified by:
- readBytesDecodedin interface- RMImageData.ImageReader
 
 
- 
 
-