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 Link icon

    Fields inherited from class com.idrsolutions.image.JDeliImage Link icon

    bb
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
     
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    com.idrsolutions.image.jpeg2000.data.Info
     
    read(byte[] jpxRawData)
    Make NO assumptions about BufferedImage type returned as it may change
    read(File file)
    Make NO assumptions about BufferedImage type returned as it may change
    byte[]
    Not recommended for external use.
    readDimension(byte[] jp2RawData)
    Decodes and returns the width and height of jpeg2000 image
    Decodes and returns the width and height of jpeg2000 image
    static void
    updatePrecinctInfo(com.idrsolutions.image.jpeg2000.data.TileResolution resolution, int r, int ppx, int ppy)
     

    Methods inherited from class com.idrsolutions.image.JDeliImage Link icon

    optimiseImage

    Methods inherited from class java.lang.Object Link icon

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.idrsolutions.image.Decoder Link icon

    getImageCount, getImageCount, readEmbeddedThumbnail, readEmbeddedThumbnail, readImageAt, readImageAt, readImageSpecificMetaData, readImageSpecificMetaData, setMetadata
  • Constructor Details Link icon

    • Jpeg2000Decoder Link icon

      public Jpeg2000Decoder()
  • Method Details Link icon

    • read Link icon

      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.

      Specified by:
      read in interface com.idrsolutions.image.Decoder
      Parameters:
      jpxRawData - byte[] array containing the JPEG2000 data to be decoded
      Returns:
      BufferedImage The decoded image
      Throws:
      Exception - A Exception
    • readDimension Link icon

      public Rectangle readDimension(File file) throws Exception
      Decodes and returns the width and height of jpeg2000 image
      Specified by:
      readDimension in interface com.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 Link icon

      public Rectangle readDimension(byte[] jp2RawData) throws Exception
      Decodes and returns the width and height of jpeg2000 image
      Specified by:
      readDimension in interface com.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 Link icon

      public com.idrsolutions.image.jpeg2000.data.Info getInfo()
    • read Link icon

      public BufferedImage read(File file) throws Exception
      Make NO assumptions about BufferedImage type returned as it may change

      Decodes and returns the JPEG2000 image as a BufferedImage.

      Specified by:
      read in interface com.idrsolutions.image.Decoder
      Parameters:
      file - file containing the JPEG2000 data to be decoded
      Returns:
      BufferedImage The decoded image
      Throws:
      Exception - A Exception
    • updatePrecinctInfo Link icon

      public static void updatePrecinctInfo(com.idrsolutions.image.jpeg2000.data.TileResolution resolution, int r, int ppx, int ppy)
    • readComponentsAsUnConvertedBytes Link icon

      public 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