Class Jpeg2000

    • Constructor Detail

      • Jpeg2000

        Jpeg2000​(Image image)
      • Jpeg2000

        public Jpeg2000​(java.net.URL url)
                 throws BadElementException,
                        java.io.IOException
        Constructs a Jpeg2000-object, using an url.
        Parameters:
        url - the URL where the image can be found
        Throws:
        BadElementException
        java.io.IOException
      • Jpeg2000

        public Jpeg2000​(byte[] img)
                 throws BadElementException,
                        java.io.IOException
        Constructs a Jpeg2000-object from memory.
        Parameters:
        img - the memory image
        Throws:
        BadElementException
        java.io.IOException
      • Jpeg2000

        public Jpeg2000​(byte[] img,
                        float width,
                        float height)
                 throws BadElementException,
                        java.io.IOException
        Constructs a Jpeg2000-object from memory.
        Parameters:
        img - the memory image.
        width - the width you want the image to have
        height - the height you want the image to have
        Throws:
        BadElementException
        java.io.IOException
    • Method Detail

      • cio_read

        private int cio_read​(int n)
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • jp2_read_boxhdr

        public void jp2_read_boxhdr()
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • processParameters

        private void processParameters()
                                throws java.io.IOException
        This method checks if the image is a valid JPEG and processes some parameters.
        Throws:
        java.io.IOException
      • jp2_read_colr

        private Jpeg2000.ColorSpecBox jp2_read_colr()
                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • getNumOfComps

        public int getNumOfComps()
      • getBpcBoxData

        public byte[] getBpcBoxData()
      • isJp2

        public boolean isJp2()
        Returns:
        true if the image is JP2, false if a codestream.