steghide 0.5.1
JpegFile.h
Go to the documentation of this file.
1/*
2 * steghide 0.5.1 - a steganography program
3 * Copyright (C) 1999-2003 Stefan Hetzl <shetzl@chello.at>
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 *
19 */
20
21#ifndef SH_JPEGFILE_H
22#define SH_JPEGFILE_H
23
24#include "common.h"
25
26#ifdef USE_LIBJPEG
27
28#include <vector>
29
30extern "C" {
31#include <stdio.h>
32#include <jpeglib.h>
33}
34
35class BinaryIO ;
36#include "CvrStgFile.h"
37class SampleValue ;
38
45class JpegFile : public CvrStgFile {
46 public:
47 JpegFile (BinaryIO* io) ;
48 ~JpegFile (void) ;
49
50 void read (BinaryIO* io) ;
51 void write (void) ;
52
53 std::list<CvrStgFile::Property> getProperties (void) const ;
54 std::vector<MatchingAlgorithm*> getMatchingAlgorithms (Graph* g, Matching* m) const ;
55
56 unsigned long getNumSamples (void) const ;
57 void replaceSample (const SamplePos pos, const SampleValue* s) ;
58 SampleValue* getSampleValue (const SamplePos pos) const ;
59 EmbValue getEmbeddedValue (const SamplePos pos) const ;
60
61#ifdef DEBUG
62 std::map<SampleKey,unsigned long>* getFrequencies (void) ;
69 void printFrequencies (const std::map<SampleKey,unsigned long>& freqs) ;
70#endif
71
72 private:
74 static const unsigned int CoeffPerBlock = 64 ;
75
76 static const unsigned short SamplesPerVertex = 3 ;
77 static const UWORD32 Radius = 1 ;
78 static const EmbValue EmbValueModulus = 2 ;
79
80 struct jpeg_compress_struct CInfo ;
81 struct jpeg_decompress_struct DeCInfo ;
82 unsigned int* HeightInBlocks ;
83 unsigned int* WidthInBlocks ;
84 jvirt_barray_ptr* DctCoeffs ;
85
86 std::vector<SWORD16> LinDctCoeffs ;
87 std::vector<UWORD32> StegoIndices ;
88} ;
89
90#endif // def USE_LIBJPEG
91
92#endif // ndef SH_JPEGFILE_H
provides methods for file i/o as needed by the rest of steghide
Definition BinaryIO.h:33
a cover-/stego-file
Definition CvrStgFile.h:46
virtual void read(BinaryIO *io)
Definition CvrStgFile.cc:63
virtual std::vector< MatchingAlgorithm * > getMatchingAlgorithms(Graph *g, Matching *m) const
Definition CvrStgFile.cc:103
virtual EmbValue getEmbeddedValue(const SamplePos pos) const
Definition CvrStgFile.cc:111
virtual std::list< Property > getProperties(void) const =0
virtual void write(void)
Definition CvrStgFile.cc:68
virtual void replaceSample(const SamplePos pos, const SampleValue *s)=0
virtual SampleValue * getSampleValue(const SamplePos pos) const =0
virtual unsigned long getNumSamples(void) const =0
a graph constructed from a cover file and a message to be embedded
Definition Graph.h:51
represent a matching on a graph
Definition Matching.h:41
the value of a sample in a CvrStgFile
Definition SampleValue.h:61
UWORD32 SamplePos
Definition common.h:67
unsigned long UWORD32
Definition common.h:45
BYTE EmbValue
Definition common.h:66