Package steganography.util
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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BuffImgEncoder
getEncoder(long seed)
Determines and returns the suitable encoder (and overlay) for the image according to its type.java.lang.String
getFormat()
Returns the images format.byte[]
getImageAsByteArray()
Returns the image in its current state (Output-Image) as a byte Array.
-
-
-
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 arrayImageWritingException
- if the image was not written to a byte array for unknown reasons
-
getFormat
java.lang.String getFormat() throws UnsupportedImageTypeException, java.io.IOException, NoImageException
Returns the images format.
- Returns:
- the images format (png, bmp, ...) as a String
- Throws:
UnsupportedImageTypeException
- if the image type read from input is not supportedjava.io.IOException
- if there was an error during reading of inputNoImageException
- if no image could be read from input
-
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 / overlayjava.io.IOException
- if there was an error during reading of inputNoImageException
- if no image could be read from input
-
-