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
BmpSampleValue.h
ColorPalette.h
CvrStgFile.h
BmpPaletteSampleValue::getRed
BYTE getRed(void) const
Definition BmpPaletteSampleValue.h:41
BmpPaletteSampleValue::calcEValue
EmbValue calcEValue(BYTE idx) const
Definition BmpPaletteSampleValue.h:49
BmpPaletteSampleValue::BmpPaletteSampleValue
BmpPaletteSampleValue(BYTE i)
Definition BmpPaletteSampleValue.cc:25
BmpPaletteSampleValue::getGreen
BYTE getGreen(void) const
Definition BmpPaletteSampleValue.h:42
BmpPaletteSampleValue::getIndex
BYTE getIndex(void) const
Definition BmpPaletteSampleValue.h:40
BmpPaletteSampleValue::getBlue
BYTE getBlue(void) const
Definition BmpPaletteSampleValue.h:43
BmpPaletteSampleValue::Index
BYTE Index
Definition BmpPaletteSampleValue.h:47
BmpPaletteSampleValue::getNearestTargetSampleValue
SampleValue * getNearestTargetSampleValue(EmbValue t) const
Definition BmpPaletteSampleValue.cc:36
BmpPaletteSampleValue::Palette
ColorPalette * Palette
Definition BmpPaletteSampleValue.h:46
BmpPaletteSampleValue::getName
std::string getName(void) const
Definition BmpPaletteSampleValue.cc:58
BmpSampleValue::BmpSampleValue
BmpSampleValue(void)
Definition BmpSampleValue.h:33
ColorPalette
a color palette
Definition ColorPalette.h:36
SampleValue::SampleValue
SampleValue(void)
Definition SampleValue.cc:25
common.h
Globs
Globals Globs
Definition Embedder.cc:41
BYTE
unsigned char BYTE
Definition common.h:47
EmbValue
BYTE EmbValue
Definition common.h:66