Package com.idrsolutions.image.jpeg2000
Class Jpeg2000Decoder
java.lang.Object
com.idrsolutions.image.JDeliImage
com.idrsolutions.image.jpeg2000.Jpeg2000Decoder
- All Implemented Interfaces:
com.idrsolutions.image.Decoder
public class Jpeg2000Decoder
extends com.idrsolutions.image.JDeliImage
implements com.idrsolutions.image.Decoder
Class reads JPEG2000 images as BufferedImage //Make NO assumptions about type of BufferedImage type returned as this
may change
Example:
Jpeg2000Decoder decoder = new Jpeg2000Decoder();
BufferedImage decodedImage = decoder.read(jpxByteData);
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.idrsolutions.image.jpeg2000.data.Info
getInfo()
read
(byte[] jpxRawData) Make NO assumptions about BufferedImage type returned as it may changeMake NO assumptions about BufferedImage type returned as it may changebyte[]
readComponentsAsUnConvertedBytes
(byte[] jpxRawData) Not recommended for external use.readDimension
(byte[] jp2RawData) Decodes and returns the width and height of jpeg2000 imagereadDimension
(File file) Decodes and returns the width and height of jpeg2000 imagestatic void
updatePrecinctInfo
(com.idrsolutions.image.jpeg2000.data.TileResolution resolution, int r, int ppx, int ppy)
-
Constructor Details
-
Method Details
-
read
Make NO assumptions about BufferedImage type returned as it may changeDecodes and returns the JPEG2000 image as a BufferedImage.
- Specified by:
read
in interfacecom.idrsolutions.image.Decoder
- Parameters:
jpxRawData
- byte[] array containing the JPEG2000 data to be decoded- Returns:
- BufferedImage The decoded image
- Throws:
Exception
- A Exception
-
readDimension
Decodes and returns the width and height of jpeg2000 image- Specified by:
readDimension
in interfacecom.idrsolutions.image.Decoder
- Parameters:
file
- image image contained in raw data if present- Returns:
- width and height of image
- Throws:
Exception
- if problem reading image
-
readDimension
Decodes and returns the width and height of jpeg2000 image- Specified by:
readDimension
in interfacecom.idrsolutions.image.Decoder
- Parameters:
jp2RawData
- image image contained in raw data if present- Returns:
- Rectangle width and height of image
- Throws:
Exception
- if problem reading image
-
getInfo
public com.idrsolutions.image.jpeg2000.data.Info getInfo() -
read
Make NO assumptions about BufferedImage type returned as it may changeDecodes and returns the JPEG2000 image as a BufferedImage.
- Specified by:
read
in interfacecom.idrsolutions.image.Decoder
- Parameters:
file
- file containing the JPEG2000 data to be decoded- Returns:
- BufferedImage The decoded image
- Throws:
Exception
- A Exception
-
updatePrecinctInfo
public static void updatePrecinctInfo(com.idrsolutions.image.jpeg2000.data.TileResolution resolution, int r, int ppx, int ppy) -
readComponentsAsUnConvertedBytes
Not recommended for external use.Decodes JPEG2000 image data as un-converted RGB/gray image bytes
- Parameters:
jpxRawData
- byte[] array containing the raw JPEG data- Returns:
- un-converted byte[]
- Throws:
Exception
- Provides for different exceptions thrown under java Lang package
-