Class Jpeg2000

  • All Implemented Interfaces:
    Element

    public class Jpeg2000
    extends Image
    An Jpeg2000 is the representation of a graphic element (JPEG) that has to be inserted into the document
    See Also:
    Element, Image
    • 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 - on error
        java.io.IOException - on error
      • Jpeg2000

        public Jpeg2000​(byte[] img)
                 throws BadElementException,
                        java.io.IOException
        Constructs a Jpeg2000-object from memory.
        Parameters:
        img - the memory image
        Throws:
        BadElementException - on error
        java.io.IOException - on error
      • 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 - on error
        java.io.IOException - on error
    • 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 - on error