Package digilib.io

Class ImageInput

    • Field Detail

      • mimetype

        protected String mimetype
        mime file type
      • pixelSize

        protected ImageSize pixelSize
        image size in pixels
      • tileSize

        protected ImageSize tileSize
        image tile size (null if untiled)
    • Constructor Detail

      • ImageInput

        public ImageInput()
    • Method Detail

      • getSize

        public ImageSize getSize()
        Returns:
        ImageSize
      • setSize

        public void setSize​(ImageSize imageSize)
        Sets the imageSize.
        Parameters:
        imageSize - The imageSize to set
      • getTileSize

        public ImageSize getTileSize()
        Returns:
        the tileSize
      • setTileSize

        public void setTileSize​(ImageSize tileSize)
        Parameters:
        tileSize - the tileSize to set
      • hasMimetype

        public boolean hasMimetype()
        returns if mimetype has been set.
        Returns:
        String
      • getMimetype

        public String getMimetype()
        Returns:
        String
      • setMimetype

        public void setMimetype​(String filetype)
        Sets the mimetype.
        Parameters:
        filetype - The mimetype to set
      • hasTag

        public boolean hasTag​(ImageInput.InputTag tag)
        Returns if the input has the given tag. Always matches if tag==null.
        Parameters:
        tag -
        Returns:
      • setTag

        public void setTag​(ImageInput.InputTag tag)
        Sets the given tag on the input.
        Parameters:
        tag - the tag to set
      • isChecked

        public boolean isChecked()
        returns if this image has been checked (i.e. has size and mimetype) TODO: deprecated
        Returns:
        is checked
      • getAspect

        public float getAspect()
        Returns the aspect ratio of the image (width/height).
        Returns:
        the aspect ratio
      • hasImageInputStream

        public boolean hasImageInputStream()
        Returns if the input can be returned as ImageInputStream.
        Returns:
        has ImageInputStream
      • getImageInputStream

        public ImageInputStream getImageInputStream()
        Returns the input as ImageInputStream (if available)
        Returns:
        the ImageInputStream
      • hasInputStream

        public boolean hasInputStream()
        Returns if the input can be returned as InputStream.
        Returns:
        has InputStream
      • getInputStream

        public InputStream getInputStream()
        Returns the input as InputStream (if available)
        Returns:
        the InputStream
      • hasFile

        public boolean hasFile()
        Returns if the input can be returned as File.
        Returns:
        has File
      • getFile

        public File getFile()
        Returns the input as File (if available)
        Returns:
        the File