Class Jpeg2000Decoder


  • public class Jpeg2000Decoder
    extends com.idrsolutions.image.JDeliImage
    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);
     
    • Constructor Detail

      • Jpeg2000Decoder

        public Jpeg2000Decoder()
    • Method Detail

      • read

        public BufferedImage read​(byte[] jpxRawData)
                           throws Exception
        Make NO assumptions about BufferedImage type returned as it may change

        Decodes and returns the JPEG2000 image as a BufferedImage.

        Parameters:
        jpxRawData - byte[] array containing the JPEG2000 data to be decoded
        Returns:
        BufferedImage The decoded image
        Throws:
        Exception - A Exception
      • readComponentsAsConvertedBytes

        public static byte[] readComponentsAsConvertedBytes​(byte[] jpxRawData)
                                                     throws Exception
        Not recommended for external use.

        Decodes JPEG2000 image data as RGB/gray image bytes

        Parameters:
        jpxRawData - byte[] array containing the JPEG data
        Returns:
        converted byte[]
        Throws:
        Exception - Provides for different exceptions thrown under java Lang package
      • readComponentsAsUnConvertedBytes

        public static byte[] readComponentsAsUnConvertedBytes​(byte[] jpxRawData)
                                                       throws Exception
        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