Interface ImageStegIO

  • All Known Implementing Classes:
    ImageStegIOJava

    public interface ImageStegIO
    Classes which implement this interface exist to handle reading and writing of images to and from byte arrays as well as choosing the appropriate encoders (and their overlays) for the given image. They hold on to the image during its en- or decoding.
    • Method Detail

      • getImageAsByteArray

        byte[] getImageAsByteArray()
                            throws java.io.IOException,
                                   ImageWritingException

        Returns the image in its current state (Output-Image) as a byte Array.

        Returns:
        the image in its current state as a byte array
        Throws:
        java.io.IOException - if there was an error during writing of BufferedImage to a byte array
        ImageWritingException - if the image was not written to a byte array for unknown reasons
      • getEncoder

        BuffImgEncoder getEncoder​(long seed)
                           throws UnsupportedImageTypeException,
                                  java.io.IOException,
                                  NoImageException

        Determines and returns the suitable encoder (and overlay) for the image according to its type.

        Parameters:
        seed - to hand to the overlay
        Returns:
        BuffImgEncoder with set PixelCoordinateOverlay, chosen accordingly to the images type
        Throws:
        UnsupportedImageTypeException - if the images type is not supported by any known encoder / overlay
        java.io.IOException - if there was an error during reading of input
        NoImageException - if no image could be read from input