trex.Filter
Class TRexFilterRGB

java.lang.Object
  |
  +--java.awt.image.ImageFilter
        |
        +--java.awt.image.RGBImageFilter
              |
              +--trex.Filter.TRexFilterRGB
All Implemented Interfaces:
Cloneable, ImageConsumer
Direct Known Subclasses:
StegoAlgoLSB.LSBDecryptFilter, StegoAlgoLSB.LSBEncryptFilter

public abstract class TRexFilterRGB
extends RGBImageFilter

This is the base class for all encrypt and decrypt filters. Filters have to implement the filterRGB() function as defined in RGBImageFilter.

Version:
$Revision: 1.11 $
Author:
Bastian Friedrich <bastian@bastian-friedrich.de>

Field Summary
protected  byte[] data
          Data to hide as a byte array.
protected  int h
          Objective picture's size.
protected  int w
          Objective picture's size.
 
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
TRexFilterRGB()
          Default constructor.
TRexFilterRGB(String data, int w, int h)
          Creates a new filter.
 
Method Summary
 String getData()
          Return contained data as a String.
 
Methods inherited from class java.awt.image.RGBImageFilter
filterIndexColorModel, filterRGB, 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
 

Field Detail

data

protected byte[] data
Data to hide as a byte array. Is converted to a String by getData().

See Also:
getData()

w

protected int w
Objective picture's size. This is needed for calculating the pixel's absoulte position in the one-dimensional array.


h

protected int h
Objective picture's size. This is needed for calculating the pixel's absoulte position in the one-dimensional array.

Constructor Detail

TRexFilterRGB

public TRexFilterRGB()
Default constructor. Initializes data fields with null values. Should never be used.


TRexFilterRGB

public TRexFilterRGB(String data,
                     int w,
                     int h)
Creates a new filter.

Parameters:
data - Data to hide
w - Picture's width
h - Picture's height
Method Detail

getData

public String getData()
               throws DecryptImpossibleException
Return contained data as a String.

Returns:
Contained data.
DecryptImpossibleException