Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 7392c77c84ff25edfeb07995a77d5148 > files > 77

steghide-0.5.1-11mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>steghide: BmpRGBSampleValue.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.9 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;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 class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
<h1>BmpRGBSampleValue.h</h1><a href="BmpRGBSampleValue_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * steghide 0.5.1 - a steganography program</span>
<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1999-2003 Stefan Hetzl &lt;shetzl@chello.at&gt;</span>
<a name="l00004"></a>00004 <span class="comment"> *</span>
<a name="l00005"></a>00005 <span class="comment"> * This program is free software; you can redistribute it and/or</span>
<a name="l00006"></a>00006 <span class="comment"> * modify it under the terms of the GNU General Public License</span>
<a name="l00007"></a>00007 <span class="comment"> * as published by the Free Software Foundation; either version 2</span>
<a name="l00008"></a>00008 <span class="comment"> * of the License, or (at your option) any later version.</span>
<a name="l00009"></a>00009 <span class="comment"> *</span>
<a name="l00010"></a>00010 <span class="comment"> * This program is distributed in the hope that it will be useful,</span>
<a name="l00011"></a>00011 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00012"></a>00012 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00013"></a>00013 <span class="comment"> * GNU General Public License for more details.</span>
<a name="l00014"></a>00014 <span class="comment"> *</span>
<a name="l00015"></a>00015 <span class="comment"> * You should have received a copy of the GNU General Public License</span>
<a name="l00016"></a>00016 <span class="comment"> * along with this program; if not, write to the Free Software</span>
<a name="l00017"></a>00017 <span class="comment"> * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.</span>
<a name="l00018"></a>00018 <span class="comment"> *</span>
<a name="l00019"></a>00019 <span class="comment"> */</span>
<a name="l00020"></a>00020 
<a name="l00021"></a>00021 <span class="preprocessor">#ifndef SH_BMPRGBSAMPLEVALUE_H</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define SH_BMPRGBSAMPLEVALUE_H</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span>
<a name="l00024"></a>00024 <span class="preprocessor">#include "<a class="code" href="BmpSampleValue_8h.html">BmpSampleValue.h</a>"</span>
<a name="l00025"></a>00025 <span class="preprocessor">#include "<a class="code" href="RGBTriple_8h.html">RGBTriple.h</a>"</span>
<a name="l00026"></a>00026 <span class="preprocessor">#include "<a class="code" href="common_8h.html">common.h</a>"</span>
<a name="l00027"></a>00027 
<a name="l00032"></a><a class="code" href="classBmpRGBSampleValue.html">00032</a> <span class="keyword">class </span><a class="code" href="classBmpRGBSampleValue.html" title="a sample in a bmp rgb (i.e. 24-bit) file">BmpRGBSampleValue</a> : <span class="keyword">public</span> <a class="code" href="classBmpSampleValue.html" title="an (abstract) sample value in a bmp file">BmpSampleValue</a> {
<a name="l00033"></a>00033         <span class="keyword">public</span>:
<a name="l00034"></a>00034         <a class="code" href="classBmpRGBSampleValue.html#2038cd4fa8aa78195078db8a40e8af50">BmpRGBSampleValue</a> (<a class="code" href="common_8h.html#4ae1dab0fb4b072a66584546209e7d58">BYTE</a> r, <a class="code" href="common_8h.html#4ae1dab0fb4b072a66584546209e7d58">BYTE</a> g, <a class="code" href="common_8h.html#4ae1dab0fb4b072a66584546209e7d58">BYTE</a> b) ;
<a name="l00035"></a>00035         <a class="code" href="classBmpRGBSampleValue.html#2038cd4fa8aa78195078db8a40e8af50">BmpRGBSampleValue</a> (<a class="code" href="classRGBTriple.html">RGBTriple</a> t) ;
<a name="l00036"></a>00036 
<a name="l00037"></a>00037         <a class="code" href="common_8h.html#6b8592979b076e06aa233e3f586ac999">UWORD32</a> <a class="code" href="classBmpRGBSampleValue.html#558ea1a6a1cc8fe882daef7b1d75be4b">calcDistance</a> (<span class="keyword">const</span> <a class="code" href="classSampleValue.html" title="the value of a sample in a CvrStgFile">SampleValue</a> *s) <span class="keyword">const</span> ;
<a name="l00038"></a>00038         <a class="code" href="classSampleValue.html" title="the value of a sample in a CvrStgFile">SampleValue</a>* <a class="code" href="classBmpRGBSampleValue.html#6d73441a935ae235e87e9bc68b3649b1">getNearestTargetSampleValue</a> (<a class="code" href="common_8h.html#cf820202f81f25eb00734eac0d7aed2d">EmbValue</a> t) <span class="keyword">const</span> ;
<a name="l00039"></a>00039         std::string <a class="code" href="classBmpRGBSampleValue.html#07efa1e868fed53a78d2b0ed1f9fced0">getName</a> (<span class="keywordtype">void</span>) <span class="keyword">const</span> ;
<a name="l00040"></a>00040 
<a name="l00041"></a><a class="code" href="classBmpRGBSampleValue.html#0d0b4acb960d7024e8560605260bd488">00041</a>         <a class="code" href="common_8h.html#4ae1dab0fb4b072a66584546209e7d58">BYTE</a> <a class="code" href="classBmpRGBSampleValue.html#0d0b4acb960d7024e8560605260bd488">getRed</a> (<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classBmpRGBSampleValue.html#48f3be8e29c6e6689a7e8456fe298c3f">Color</a>.<a class="code" href="classRGBTriple.html#e89cd719bd23402ce4290ee723e2db72">Red</a> ; } ;
<a name="l00042"></a><a class="code" href="classBmpRGBSampleValue.html#4a9db68fe15d0b3fa761d3dd7bae900a">00042</a>         <a class="code" href="common_8h.html#4ae1dab0fb4b072a66584546209e7d58">BYTE</a> <a class="code" href="classBmpRGBSampleValue.html#4a9db68fe15d0b3fa761d3dd7bae900a">getGreen</a> (<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classBmpRGBSampleValue.html#48f3be8e29c6e6689a7e8456fe298c3f">Color</a>.<a class="code" href="classRGBTriple.html#418d7693e0c3db631b601f3c09e1d01c">Green</a> ; } ;
<a name="l00043"></a><a class="code" href="classBmpRGBSampleValue.html#3503f564c0a1d56bf91ad2f129f2948c">00043</a>         <a class="code" href="common_8h.html#4ae1dab0fb4b072a66584546209e7d58">BYTE</a> <a class="code" href="classBmpRGBSampleValue.html#3503f564c0a1d56bf91ad2f129f2948c">getBlue</a> (<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classBmpRGBSampleValue.html#48f3be8e29c6e6689a7e8456fe298c3f">Color</a>.<a class="code" href="classRGBTriple.html#8f690931d10d813d60ec03b3f19d55df">Blue</a> ; } ;
<a name="l00044"></a>00044 
<a name="l00045"></a>00045         <span class="keyword">private</span>:
<a name="l00046"></a>00046         <a class="code" href="classRGBTriple.html">RGBTriple</a> <a class="code" href="classBmpRGBSampleValue.html#48f3be8e29c6e6689a7e8456fe298c3f">Color</a> ;
<a name="l00047"></a>00047 
<a name="l00048"></a><a class="code" href="classBmpRGBSampleValue.html#9c4b9dc6200cb84def939130d3e36293">00048</a>         <a class="code" href="common_8h.html#6b8592979b076e06aa233e3f586ac999">UWORD32</a> <a class="code" href="classBmpRGBSampleValue.html#9c4b9dc6200cb84def939130d3e36293">calcKey</a> (<span class="keyword">const</span> <a class="code" href="classRGBTriple.html">RGBTriple</a>&amp; rgb)<span class="keyword"> const</span>
<a name="l00049"></a>00049 <span class="keyword">                </span>{ <span class="keywordflow">return</span> (((<a class="code" href="common_8h.html#6b8592979b076e06aa233e3f586ac999">UWORD32</a>) rgb.<a class="code" href="classRGBTriple.html#e89cd719bd23402ce4290ee723e2db72">Red</a> &lt;&lt; 16) | ((<a class="code" href="common_8h.html#6b8592979b076e06aa233e3f586ac999">UWORD32</a>) rgb.<a class="code" href="classRGBTriple.html#418d7693e0c3db631b601f3c09e1d01c">Green</a> &lt;&lt; 8) | ((<a class="code" href="common_8h.html#6b8592979b076e06aa233e3f586ac999">UWORD32</a>) rgb.<a class="code" href="classRGBTriple.html#8f690931d10d813d60ec03b3f19d55df">Blue</a>)) ;} ;
<a name="l00050"></a>00050 
<a name="l00051"></a><a class="code" href="classBmpRGBSampleValue.html#33f170ceac33b2565b052e8d739c90f4">00051</a>         <a class="code" href="common_8h.html#cf820202f81f25eb00734eac0d7aed2d">EmbValue</a> <a class="code" href="classBmpRGBSampleValue.html#33f170ceac33b2565b052e8d739c90f4">calcEValue</a> (<span class="keyword">const</span> <a class="code" href="classRGBTriple.html">RGBTriple</a>&amp; rgb) <span class="keyword">const</span>
<a name="l00052"></a>00052                 <span class="comment">// { /* for Modulus 8 */ return ((EmbValue) (((rgb.Red &amp; 1) &lt;&lt; 2) | ((rgb.Green &amp; 1) &lt;&lt; 1) | (rgb.Blue &amp; 1))) ; } ;</span>
<a name="l00053"></a>00053                 { <span class="comment">/* for Modulus 4 */</span> <span class="keywordflow">return</span> ((<a class="code" href="common_8h.html#cf820202f81f25eb00734eac0d7aed2d">EmbValue</a>) ((((rgb.Red &amp; 1) ^ (rgb.Green &amp; 1)) &lt;&lt; 1) | ((rgb.Red &amp; 1) ^ (rgb.Blue &amp; 1)))) ; } ;
<a name="l00054"></a>00054 
<a name="l00055"></a><a class="code" href="classBmpRGBSampleValue.html#1e5208b4f0d09c8f61d78cdfd5488d3d4d2386856b553e3831419719cf284704">00055</a>         <span class="keyword">enum</span> <a class="code" href="classBmpRGBSampleValue.html#1e5208b4f0d09c8f61d78cdfd5488d3d">COLOR</a> { <a class="code" href="classBmpRGBSampleValue.html#1e5208b4f0d09c8f61d78cdfd5488d3d4d2386856b553e3831419719cf284704">RED</a>, <a class="code" href="classBmpRGBSampleValue.html#1e5208b4f0d09c8f61d78cdfd5488d3d1c65467ddf0f5d047a09cb2e772e1140">GREEN</a>, <a class="code" href="classBmpRGBSampleValue.html#1e5208b4f0d09c8f61d78cdfd5488d3d4f80e6362ff5d7e0e27950d7d18ca7de">BLUE</a> } ;
<a name="l00056"></a><a class="code" href="classBmpRGBSampleValue.html#c0d93f8972ad38b753b94df6991f77f6c51fc636bcbf6661c93467e2e7ca2130">00056</a>         <span class="keyword">enum</span> <a class="code" href="classBmpRGBSampleValue.html#c0d93f8972ad38b753b94df6991f77f6">DIRECTION</a> { <a class="code" href="classBmpRGBSampleValue.html#c0d93f8972ad38b753b94df6991f77f6c51fc636bcbf6661c93467e2e7ca2130">UP</a>, <a class="code" href="classBmpRGBSampleValue.html#c0d93f8972ad38b753b94df6991f77f60a44fea06b72341ea0b8c0984d2ed71b">DOWN</a> } ;
<a name="l00057"></a>00057 
<a name="l00062"></a>00062         <a class="code" href="common_8h.html#4ae1dab0fb4b072a66584546209e7d58">BYTE</a> <a class="code" href="classBmpRGBSampleValue.html#2a0ae215b46892ec115c507ea5b1e6b9">plus</a> (<a class="code" href="common_8h.html#4ae1dab0fb4b072a66584546209e7d58">BYTE</a> a, <a class="code" href="common_8h.html#4ae1dab0fb4b072a66584546209e7d58">BYTE</a> b) <span class="keyword">const</span> ;
<a name="l00063"></a>00063 
<a name="l00068"></a>00068         <a class="code" href="common_8h.html#4ae1dab0fb4b072a66584546209e7d58">BYTE</a> <a class="code" href="classBmpRGBSampleValue.html#40d7043f05eea0685d40dea51c318c91">minus</a> (<a class="code" href="common_8h.html#4ae1dab0fb4b072a66584546209e7d58">BYTE</a> a, <a class="code" href="common_8h.html#4ae1dab0fb4b072a66584546209e7d58">BYTE</a> b) <span class="keyword">const</span> ;
<a name="l00069"></a>00069 
<a name="l00077"></a>00077         <span class="keywordtype">void</span> <a class="code" href="classBmpRGBSampleValue.html#d25d858c9d2968fc91495576d3da3908">addNTSVCandidates</a> (std::vector&lt;RGBTriple&gt;&amp; cands, <span class="keyword">const</span> <a class="code" href="common_8h.html#4ae1dab0fb4b072a66584546209e7d58">BYTE</a> cube[3][2], <a class="code" href="classBmpRGBSampleValue.html#1e5208b4f0d09c8f61d78cdfd5488d3d">COLOR</a> fc, <a class="code" href="classBmpRGBSampleValue.html#c0d93f8972ad38b753b94df6991f77f6">DIRECTION</a> fd, <a class="code" href="classBmpRGBSampleValue.html#1e5208b4f0d09c8f61d78cdfd5488d3d">COLOR</a> i1, <a class="code" href="classBmpRGBSampleValue.html#1e5208b4f0d09c8f61d78cdfd5488d3d">COLOR</a> i2, <a class="code" href="common_8h.html#cf820202f81f25eb00734eac0d7aed2d">EmbValue</a> t) <span class="keyword">const</span> ;
<a name="l00078"></a>00078 } ;
<a name="l00079"></a>00079 
<a name="l00080"></a>00080 <span class="preprocessor">#endif // ndef SH_BMPRGBSAMPLEVALUE_H</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Mon Aug 17 10:58:29 2009 for steghide by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
</body>
</html>