Package fr.esrf.tangoatk.widget.image
Class JpegDecoder
java.lang.Object
javax.imageio.stream.ImageInputStreamImpl
fr.esrf.tangoatk.widget.image.JpegDecoder
- All Implemented Interfaces:
Closeable,DataInput,AutoCloseable,ImageInputStream
A class to decode jpeg image
Author: JL Pons
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int8 Bits Gray scalestatic final int32 Bits RGBFields inherited from class javax.imageio.stream.ImageInputStreamImpl
bitOffset, byteOrder, flushedPos, streamPos -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class javax.imageio.stream.ImageInputStreamImpl
checkClosed, close, finalize, flush, flushBefore, getBitOffset, getByteOrder, getFlushedPosition, getStreamPosition, isCached, isCachedFile, isCachedMemory, length, mark, read, readBit, readBits, readBoolean, readByte, readBytes, readChar, readDouble, readFloat, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedInt, readUnsignedShort, readUTF, reset, seek, setBitOffset, setByteOrder, skipBytes, skipBytes
-
Field Details
-
RGB24
public static final int RGB2432 Bits RGB- See Also:
-
GRAY8
public static final int GRAY88 Bits Gray scale- See Also:
-
-
Constructor Details
-
JpegDecoder
public JpegDecoder()Contructs a JPEG decoder
-
-
Method Details
-
setBuffer
public void setBuffer(byte[] jpgBuffer) Set data- Parameters:
jpgBuffer- buffer of encoded data
-
GetType
public int GetType() -
decode
Decode the image- Returns:
- An array of 8Bits graysscale or 32Bits RGB
- Throws:
IOException- in case of failure
-
read
- Specified by:
readin interfaceImageInputStream- Specified by:
readin classImageInputStreamImpl- Throws:
IOException
-
read
- Specified by:
readin interfaceImageInputStream- Specified by:
readin classImageInputStreamImpl- Throws:
IOException
-