trex.Algo
Class StegoAlgoLSB.LSBEncryptFilter

java.lang.Object
  |
  +--java.awt.image.ImageFilter
        |
        +--java.awt.image.RGBImageFilter
              |
              +--trex.Filter.TRexFilterRGB
                    |
                    +--trex.Algo.StegoAlgoLSB.LSBEncryptFilter
All Implemented Interfaces:
Cloneable, ImageConsumer
Enclosing class:
StegoAlgoLSB

protected class StegoAlgoLSB.LSBEncryptFilter
extends TRexFilterRGB

LSBEncryptFilter is the encrypt filter for the LSB algorithm.


Field Summary
 
Fields inherited from class trex.Filter.TRexFilterRGB
data, h, w
 
Fields inherited from class java.awt.image.RGBImageFilter
canFilterIndexColorModel, newmodel, origmodel
 
Fields inherited from class java.awt.image.ImageFilter
consumer
 
Fields inherited from interface java.awt.image.ImageConsumer
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT
 
Constructor Summary
StegoAlgoLSB.LSBEncryptFilter(String data, int w, int h)
          Constructs a new filter.
 
Method Summary
 int filterRGB(int x, int y, int rgb)
          hides 3 bits of data in exactely one pixel and returns the new pixel
 
Methods inherited from class trex.Filter.TRexFilterRGB
getData
 
Methods inherited from class java.awt.image.RGBImageFilter
filterIndexColorModel, filterRGBPixels, setColorModel, setPixels, setPixels, substituteColorModel
 
Methods inherited from class java.awt.image.ImageFilter
clone, getFilterInstance, imageComplete, resendTopDownLeftRight, setDimensions, setHints, setProperties
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StegoAlgoLSB.LSBEncryptFilter

public StegoAlgoLSB.LSBEncryptFilter(String data,
                                     int w,
                                     int h)
Constructs a new filter.

Parameters:
data - Data to hide in the picture
w - picture's width
h - picture's height
Method Detail

filterRGB

public int filterRGB(int x,
                     int y,
                     int rgb)
hides 3 bits of data in exactely one pixel and returns the new pixel

Specified by:
filterRGB in class RGBImageFilter
Parameters:
x - horizontal coordinate
y - vertical coordinate
rgb - input pixel color
Returns:
New rgb value.