Package steganography.image.overlays
Class ShuffleOverlay
- java.lang.Object
-
- steganography.image.overlays.SequenceOverlay
-
- steganography.image.overlays.ShuffleOverlay
-
- All Implemented Interfaces:
PixelCoordinateOverlay
- Direct Known Subclasses:
RemoveTransparentShuffleOverlay
,TableOverlay
public class ShuffleOverlay extends SequenceOverlay
This class returns Pixels of the underlying BufferedImage in a random order determined by the seed that is given to its constructor
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Random
random
-
Fields inherited from class steganography.image.overlays.SequenceOverlay
bufferedImage, currentPosition, currentX, currentY, pixelOrder
-
-
Constructor Summary
Constructors Constructor Description ShuffleOverlay(java.awt.image.BufferedImage bufferedImage, long seed)
Creates a ShuffleOverlay that returns Pixels of the underlying BufferedImage in a random order determined by the seed that is given to its constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
createOverlay()
Creates the overlay as an independent method to address pixels without using BufferedImages coordinates.protected void
initOverlay()
Initialization of the overlay.protected void
shufflePixelOrder()
Randomization of the already created overlay.-
Methods inherited from class steganography.image.overlays.SequenceOverlay
available, next, setPixel, typeAccepted
-
-
-
-
Constructor Detail
-
ShuffleOverlay
public ShuffleOverlay(java.awt.image.BufferedImage bufferedImage, long seed) throws UnsupportedImageTypeException
Creates a ShuffleOverlay that returns Pixels of the underlying BufferedImage in a random order determined by the seed that is given to its constructor.- Parameters:
bufferedImage
- BufferedImage to represent the pixels ofseed
- Long to be used to affect the randomization of pixelorder.- Throws:
UnsupportedImageTypeException
- if the images type is not supported by this overlay
-
-
Method Detail
-
createOverlay
protected void createOverlay()
Creates the overlay as an independent method to address pixels without using BufferedImages coordinates. Uses two protected methods to separate the creation of the overlay from its randomization.
Subclasses should only overwrite this method to alter this separation.
- Overrides:
createOverlay
in classSequenceOverlay
-
initOverlay
protected void initOverlay()
Initialization of the overlay. This process is separate from the randomization of the overlay.
-
shufflePixelOrder
protected void shufflePixelOrder()
Randomization of the already created overlay.
-
-