<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.5"/> <title>steghide: BmpPaletteSampleValue.h Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">steghide  <span id="projectnumber">0.5.1</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.5 --> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="headertitle"> <div class="title">BmpPaletteSampleValue.h</div> </div> </div><!--header--> <div class="contents"> <a href="BmpPaletteSampleValue_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div> <div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * steghide 0.5.1 - a steganography program</span></div> <div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> * Copyright (C) 1999-2003 Stefan Hetzl <shetzl@chello.at></span></div> <div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> *</span></div> <div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * This program is free software; you can redistribute it and/or</span></div> <div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * modify it under the terms of the GNU General Public License</span></div> <div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * as published by the Free Software Foundation; either version 2</span></div> <div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * of the License, or (at your option) any later version.</span></div> <div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> *</span></div> <div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * This program is distributed in the hope that it will be useful,</span></div> <div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div> <div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div> <div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * GNU General Public License for more details.</span></div> <div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> *</span></div> <div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> * You should have received a copy of the GNU General Public License</span></div> <div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * along with this program; if not, write to the Free Software</span></div> <div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.</span></div> <div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> *</span></div> <div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> */</span></div> <div class="line"><a name="l00020"></a><span class="lineno"> 20</span> </div> <div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#ifndef SH_BMPPALETTESAMPLEVALUE_H</span></div> <div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor"></span><span class="preprocessor">#define SH_BMPPALETTESAMPLEVALUE_H</span></div> <div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor"></span></div> <div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#include "<a class="code" href="BmpSampleValue_8h.html">BmpSampleValue.h</a>"</span></div> <div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#include "<a class="code" href="CvrStgFile_8h.html">CvrStgFile.h</a>"</span></div> <div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include "<a class="code" href="ColorPalette_8h.html">ColorPalette.h</a>"</span></div> <div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include "<a class="code" href="common_8h.html">common.h</a>"</span></div> <div class="line"><a name="l00028"></a><span class="lineno"> 28</span> </div> <div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="classBmpPaletteSampleValue.html"> 33</a></span> <span class="keyword">class </span><a class="code" href="classBmpPaletteSampleValue.html">BmpPaletteSampleValue</a> : <span class="keyword">public</span> <a class="code" href="classBmpSampleValue.html">BmpSampleValue</a> {</div> <div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  <span class="keyword">public</span>:</div> <div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  <a class="code" href="classBmpPaletteSampleValue.html#a81d345b74502effc44a9995ab44918ed">BmpPaletteSampleValue</a> (<a class="code" href="common_8h.html#a4ae1dab0fb4b072a66584546209e7d58">BYTE</a> i) ;</div> <div class="line"><a name="l00036"></a><span class="lineno"> 36</span> </div> <div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <a class="code" href="classSampleValue.html">SampleValue</a>* <a class="code" href="classBmpPaletteSampleValue.html#a5f8e3f970b7bc503e4720b5217ccce9b">getNearestTargetSampleValue</a> (<a class="code" href="common_8h.html#acf820202f81f25eb00734eac0d7aed2d">EmbValue</a> t) <span class="keyword">const</span> ;</div> <div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  std::string <a class="code" href="classBmpPaletteSampleValue.html#ac477a336954b4679e093a8b9856d676b">getName</a> (<span class="keywordtype">void</span>) <span class="keyword">const</span> ;</div> <div class="line"><a name="l00039"></a><span class="lineno"> 39</span> </div> <div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="classBmpPaletteSampleValue.html#a0b1d7d392eb95d9dd49042c1b68fe5c9"> 40</a></span>  <a class="code" href="common_8h.html#a4ae1dab0fb4b072a66584546209e7d58">BYTE</a> <a class="code" href="classBmpPaletteSampleValue.html#a0b1d7d392eb95d9dd49042c1b68fe5c9">getIndex</a> (<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classBmpPaletteSampleValue.html#ac838911edfa68d87a10580e098e6e353">Index</a> ; } ;</div> <div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="classBmpPaletteSampleValue.html#a6d6b04295ba5894e021d94a82247c8c9"> 41</a></span>  <a class="code" href="common_8h.html#a4ae1dab0fb4b072a66584546209e7d58">BYTE</a> <a class="code" href="classBmpPaletteSampleValue.html#a6d6b04295ba5894e021d94a82247c8c9">getRed</a> (<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (*<a class="code" href="classBmpPaletteSampleValue.html#af9a9aae8c5ce9dfd8e2566d984cf7302">Palette</a>)[<a class="code" href="classBmpPaletteSampleValue.html#ac838911edfa68d87a10580e098e6e353">Index</a>].Red ; } ;</div> <div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="classBmpPaletteSampleValue.html#a57118ccdeeacf5cdc6a734f05818f6e7"> 42</a></span>  <a class="code" href="common_8h.html#a4ae1dab0fb4b072a66584546209e7d58">BYTE</a> <a class="code" href="classBmpPaletteSampleValue.html#a57118ccdeeacf5cdc6a734f05818f6e7">getGreen</a> (<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (*<a class="code" href="classBmpPaletteSampleValue.html#af9a9aae8c5ce9dfd8e2566d984cf7302">Palette</a>)[<a class="code" href="classBmpPaletteSampleValue.html#ac838911edfa68d87a10580e098e6e353">Index</a>].Green ; } ;</div> <div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="classBmpPaletteSampleValue.html#af9a9aae8c5ce9dfd8e2566d984cf7302"> 43</a></span>  <a class="code" href="common_8h.html#a4ae1dab0fb4b072a66584546209e7d58">BYTE</a> <a class="code" href="classBmpPaletteSampleValue.html#a514232cea9e9dae4eba836f635987b4c">getBlue</a> (<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (*<a class="code" href="classBmpPaletteSampleValue.html#af9a9aae8c5ce9dfd8e2566d984cf7302">Palette</a>)[<a class="code" href="classBmpPaletteSampleValue.html#ac838911edfa68d87a10580e098e6e353">Index</a>].Blue ; } ;</div> <div class="line"><a name="l00044"></a><span class="lineno"> 44</span> </div> <div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  <span class="keyword">private</span>:</div> <div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <a class="code" href="classColorPalette.html">ColorPalette</a>* <a class="code" href="classBmpPaletteSampleValue.html#af9a9aae8c5ce9dfd8e2566d984cf7302">Palette</a> ;</div> <div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="classBmpPaletteSampleValue.html#ac838911edfa68d87a10580e098e6e353"> 47</a></span>  <a class="code" href="common_8h.html#a4ae1dab0fb4b072a66584546209e7d58">BYTE</a> <a class="code" href="classBmpPaletteSampleValue.html#ac838911edfa68d87a10580e098e6e353">Index</a> ;</div> <div class="line"><a name="l00048"></a><span class="lineno"> 48</span> </div> <div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="classBmpPaletteSampleValue.html#a46826e094b646f77ed890f2973d76a1c"> 49</a></span>  <a class="code" href="common_8h.html#acf820202f81f25eb00734eac0d7aed2d">EmbValue</a> <a class="code" href="classBmpPaletteSampleValue.html#a46826e094b646f77ed890f2973d76a1c">calcEValue</a> (<a class="code" href="common_8h.html#a4ae1dab0fb4b072a66584546209e7d58">BYTE</a> idx)<span class="keyword"> const</span></div> <div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="keyword"> </span>{ <span class="keywordflow">return</span> (idx % <a class="code" href="common_8h.html#a2a123bbda4503ceb387f31a384139bec">Globs</a>.<a class="code" href="classGlobals.html#a0086ee19afb0db15946b0a6b96f2bb19">TheCvrStgFile</a>-><a class="code" href="classCvrStgFile.html#ae807282063cd8aee46f87b898fb5bc45">getEmbValueModulus</a>()) ; } ;</div> <div class="line"><a name="l00051"></a><span class="lineno"> 51</span> } ;</div> <div class="line"><a name="l00052"></a><span class="lineno"> 52</span> </div> <div class="line"><a name="l00053"></a><span class="lineno"> 53</span> <span class="preprocessor">#endif // ndef SH_BMPPALETTESAMPLEVALUE_H</span></div> <div class="ttc" id="classBmpPaletteSampleValue_html"><div class="ttname"><a href="classBmpPaletteSampleValue.html">BmpPaletteSampleValue</a></div><div class="ttdoc">a sample in a bmp palette (i.e. in a 1-,4- or 8-bit) file </div><div class="ttdef"><b>Definition:</b> BmpPaletteSampleValue.h:33</div></div> <div class="ttc" id="BmpSampleValue_8h_html"><div class="ttname"><a href="BmpSampleValue_8h.html">BmpSampleValue.h</a></div></div> <div class="ttc" id="classBmpPaletteSampleValue_html_a46826e094b646f77ed890f2973d76a1c"><div class="ttname"><a href="classBmpPaletteSampleValue.html#a46826e094b646f77ed890f2973d76a1c">BmpPaletteSampleValue::calcEValue</a></div><div class="ttdeci">EmbValue calcEValue(BYTE idx) const </div><div class="ttdef"><b>Definition:</b> BmpPaletteSampleValue.h:49</div></div> <div class="ttc" id="classCvrStgFile_html_ae807282063cd8aee46f87b898fb5bc45"><div class="ttname"><a href="classCvrStgFile.html#ae807282063cd8aee46f87b898fb5bc45">CvrStgFile::getEmbValueModulus</a></div><div class="ttdeci">EmbValue getEmbValueModulus(void) const </div><div class="ttdef"><b>Definition:</b> CvrStgFile.h:130</div></div> <div class="ttc" id="ColorPalette_8h_html"><div class="ttname"><a href="ColorPalette_8h.html">ColorPalette.h</a></div></div> <div class="ttc" id="common_8h_html_a2a123bbda4503ceb387f31a384139bec"><div class="ttname"><a href="common_8h.html#a2a123bbda4503ceb387f31a384139bec">Globs</a></div><div class="ttdeci">Globals Globs</div><div class="ttdef"><b>Definition:</b> Embedder.cc:41</div></div> <div class="ttc" id="classBmpPaletteSampleValue_html_ac477a336954b4679e093a8b9856d676b"><div class="ttname"><a href="classBmpPaletteSampleValue.html#ac477a336954b4679e093a8b9856d676b">BmpPaletteSampleValue::getName</a></div><div class="ttdeci">std::string getName(void) const </div><div class="ttdef"><b>Definition:</b> BmpPaletteSampleValue.cc:58</div></div> <div class="ttc" id="classBmpSampleValue_html"><div class="ttname"><a href="classBmpSampleValue.html">BmpSampleValue</a></div><div class="ttdoc">an (abstract) sample value in a bmp file </div><div class="ttdef"><b>Definition:</b> BmpSampleValue.h:31</div></div> <div class="ttc" id="classBmpPaletteSampleValue_html_a0b1d7d392eb95d9dd49042c1b68fe5c9"><div class="ttname"><a href="classBmpPaletteSampleValue.html#a0b1d7d392eb95d9dd49042c1b68fe5c9">BmpPaletteSampleValue::getIndex</a></div><div class="ttdeci">BYTE getIndex(void) const </div><div class="ttdef"><b>Definition:</b> BmpPaletteSampleValue.h:40</div></div> <div class="ttc" id="classSampleValue_html"><div class="ttname"><a href="classSampleValue.html">SampleValue</a></div><div class="ttdoc">the value of a sample in a CvrStgFile </div><div class="ttdef"><b>Definition:</b> SampleValue.h:61</div></div> <div class="ttc" id="classBmpPaletteSampleValue_html_af9a9aae8c5ce9dfd8e2566d984cf7302"><div class="ttname"><a href="classBmpPaletteSampleValue.html#af9a9aae8c5ce9dfd8e2566d984cf7302">BmpPaletteSampleValue::Palette</a></div><div class="ttdeci">ColorPalette * Palette</div><div class="ttdef"><b>Definition:</b> BmpPaletteSampleValue.h:43</div></div> <div class="ttc" id="classBmpPaletteSampleValue_html_ac838911edfa68d87a10580e098e6e353"><div class="ttname"><a href="classBmpPaletteSampleValue.html#ac838911edfa68d87a10580e098e6e353">BmpPaletteSampleValue::Index</a></div><div class="ttdeci">BYTE Index</div><div class="ttdef"><b>Definition:</b> BmpPaletteSampleValue.h:47</div></div> <div class="ttc" id="classColorPalette_html"><div class="ttname"><a href="classColorPalette.html">ColorPalette</a></div><div class="ttdoc">a color palette </div><div class="ttdef"><b>Definition:</b> ColorPalette.h:36</div></div> <div class="ttc" id="common_8h_html_a4ae1dab0fb4b072a66584546209e7d58"><div class="ttname"><a href="common_8h.html#a4ae1dab0fb4b072a66584546209e7d58">BYTE</a></div><div class="ttdeci">unsigned char BYTE</div><div class="ttdef"><b>Definition:</b> common.h:47</div></div> <div class="ttc" id="classBmpPaletteSampleValue_html_a514232cea9e9dae4eba836f635987b4c"><div class="ttname"><a href="classBmpPaletteSampleValue.html#a514232cea9e9dae4eba836f635987b4c">BmpPaletteSampleValue::getBlue</a></div><div class="ttdeci">BYTE getBlue(void) const </div><div class="ttdef"><b>Definition:</b> BmpPaletteSampleValue.h:43</div></div> <div class="ttc" id="classBmpPaletteSampleValue_html_a81d345b74502effc44a9995ab44918ed"><div class="ttname"><a href="classBmpPaletteSampleValue.html#a81d345b74502effc44a9995ab44918ed">BmpPaletteSampleValue::BmpPaletteSampleValue</a></div><div class="ttdeci">BmpPaletteSampleValue(BYTE i)</div><div class="ttdef"><b>Definition:</b> BmpPaletteSampleValue.cc:25</div></div> <div class="ttc" id="classGlobals_html_a0086ee19afb0db15946b0a6b96f2bb19"><div class="ttname"><a href="classGlobals.html#a0086ee19afb0db15946b0a6b96f2bb19">Globals::TheCvrStgFile</a></div><div class="ttdeci">CvrStgFile * TheCvrStgFile</div><div class="ttdoc">the cover-/stego- file that is operated on (set in CvrStgFile::CvrStgFile) </div><div class="ttdef"><b>Definition:</b> Globals.h:55</div></div> <div class="ttc" id="CvrStgFile_8h_html"><div class="ttname"><a href="CvrStgFile_8h.html">CvrStgFile.h</a></div></div> <div class="ttc" id="classBmpPaletteSampleValue_html_a5f8e3f970b7bc503e4720b5217ccce9b"><div class="ttname"><a href="classBmpPaletteSampleValue.html#a5f8e3f970b7bc503e4720b5217ccce9b">BmpPaletteSampleValue::getNearestTargetSampleValue</a></div><div class="ttdeci">SampleValue * getNearestTargetSampleValue(EmbValue t) const </div><div class="ttdef"><b>Definition:</b> BmpPaletteSampleValue.cc:36</div></div> <div class="ttc" id="common_8h_html"><div class="ttname"><a href="common_8h.html">common.h</a></div></div> <div class="ttc" id="classBmpPaletteSampleValue_html_a57118ccdeeacf5cdc6a734f05818f6e7"><div class="ttname"><a href="classBmpPaletteSampleValue.html#a57118ccdeeacf5cdc6a734f05818f6e7">BmpPaletteSampleValue::getGreen</a></div><div class="ttdeci">BYTE getGreen(void) const </div><div class="ttdef"><b>Definition:</b> BmpPaletteSampleValue.h:42</div></div> <div class="ttc" id="common_8h_html_acf820202f81f25eb00734eac0d7aed2d"><div class="ttname"><a href="common_8h.html#acf820202f81f25eb00734eac0d7aed2d">EmbValue</a></div><div class="ttdeci">BYTE EmbValue</div><div class="ttdef"><b>Definition:</b> common.h:66</div></div> <div class="ttc" id="classBmpPaletteSampleValue_html_a6d6b04295ba5894e021d94a82247c8c9"><div class="ttname"><a href="classBmpPaletteSampleValue.html#a6d6b04295ba5894e021d94a82247c8c9">BmpPaletteSampleValue::getRed</a></div><div class="ttdeci">BYTE getRed(void) const </div><div class="ttdef"><b>Definition:</b> BmpPaletteSampleValue.h:41</div></div> </div><!-- fragment --></div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated on Fri Oct 18 2013 17:59:36 for steghide by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.5 </small></address> </body> </html>