BmpPaletteSampleValue.h
Go to the documentation of this file.
/*
* steghide 0.5.1 - a steganography program
* Copyright (C) 1999-2003 Stefan Hetzl <shetzl@chello.at>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef SH_BMPPALETTESAMPLEVALUE_H
#define SH_BMPPALETTESAMPLEVALUE_H
#include "BmpSampleValue.h"
#include "CvrStgFile.h"
#include "ColorPalette.h"
#include "common.h"
class BmpPaletteSampleValue : public BmpSampleValue {
public:
BmpPaletteSampleValue (BYTE i) ;
SampleValue* getNearestTargetSampleValue (EmbValue t) const ;
std::string getName (void) const ;
BYTE getIndex (void) const { return Index ; } ;
BYTE getRed (void) const { return (*Palette)[Index].Red ; } ;
BYTE getGreen (void) const { return (*Palette)[Index].Green ; } ;
BYTE getBlue (void) const { return (*Palette)[Index].Blue ; } ;
private:
ColorPalette* Palette ;
BYTE Index ;
EmbValue calcEValue (BYTE idx) const
{ return (idx % Globs.TheCvrStgFile->getEmbValueModulus()) ; } ;
} ;
#endif // ndef SH_BMPPALETTESAMPLEVALUE_H
BmpPaletteSampleValue
a sample in a bmp palette (i.e. in a 1-,4- or 8-bit) file
Definition: BmpPaletteSampleValue.h:33
BmpSampleValue.h
ColorPalette.h
CvrStgFile::getEmbValueModulus
EmbValue getEmbValueModulus(void) const
Definition: CvrStgFile.h:130
Globs
Globals Globs
Definition: Embedder.cc:41
BmpSampleValue
an (abstract) sample value in a bmp file
Definition: BmpSampleValue.h:31
SampleValue
the value of a sample in a CvrStgFile
Definition: SampleValue.h:61
BmpPaletteSampleValue::Palette
ColorPalette * Palette
Definition: BmpPaletteSampleValue.h:43
BmpPaletteSampleValue::Index
BYTE Index
Definition: BmpPaletteSampleValue.h:47
ColorPalette
a color palette
Definition: ColorPalette.h:36
BYTE
unsigned char BYTE
Definition: common.h:47
BmpPaletteSampleValue::getIndex
BYTE getIndex(void) const
Definition: BmpPaletteSampleValue.h:40
BmpPaletteSampleValue::calcEValue
EmbValue calcEValue(BYTE idx) const
Definition: BmpPaletteSampleValue.h:49
BmpPaletteSampleValue::BmpPaletteSampleValue
BmpPaletteSampleValue(BYTE i)
Definition: BmpPaletteSampleValue.cc:25
Globals::TheCvrStgFile
CvrStgFile * TheCvrStgFile
the cover-/stego- file that is operated on (set in CvrStgFile::CvrStgFile)
Definition: Globals.h:55
CvrStgFile.h
BmpPaletteSampleValue::getName
std::string getName(void) const
Definition: BmpPaletteSampleValue.cc:58
BmpPaletteSampleValue::getGreen
BYTE getGreen(void) const
Definition: BmpPaletteSampleValue.h:42
BmpPaletteSampleValue::getBlue
BYTE getBlue(void) const
Definition: BmpPaletteSampleValue.h:43
common.h
EmbValue
BYTE EmbValue
Definition: common.h:66
BmpPaletteSampleValue::getNearestTargetSampleValue
SampleValue * getNearestTargetSampleValue(EmbValue t) const
Definition: BmpPaletteSampleValue.cc:36
BmpPaletteSampleValue::getRed
BYTE getRed(void) const
Definition: BmpPaletteSampleValue.h:41