Sophie

Sophie

distrib > Mandriva > current > x86_64 > by-pkgid > 4272c97b1af3db3f39a3b697bcba7e48 > files > 1274

albumshaper-2.1-7mdv2010.1.x86_64.rpm

<!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"/>
<title>AlbumShaper: jpegSize.cpp File Reference</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.6.2 -->
<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>
</div>
<div class="contents">
<h1>jpegSize.cpp File Reference</h1><code>#include &quot;<a class="el" href="jpegSize_8h_source.html">jpegSize.h</a>&quot;</code><br/>
<code>#include &lt;stdio.h&gt;</code><br/>
<div class="dynheader">
Include dependency graph for jpegSize.cpp:</div>
<div class="dynsection">
</div>

<p><a href="jpegSize_8cpp_source.html">Go to the source code of this file.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="jpegSize_8cpp.html#a79d8075203f66de43561298655e7066a">NEXTBYTE</a>()&nbsp;&nbsp;&nbsp;getc(<a class="el" href="jpegSize_8cpp.html#af19157da745ecb3f2b088c8f3a10c0a7">infile</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="jpegSize_8cpp.html#ae747795c32cea1314b49e9b7d65be454">M_SOF0</a>&nbsp;&nbsp;&nbsp;0xC0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="jpegSize_8cpp.html#ab58d501dd163fdd0dee4ba6907e191a0">M_SOF1</a>&nbsp;&nbsp;&nbsp;0xC1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="jpegSize_8cpp.html#aeeeb620f261aa6b63448de940c7a7714">M_SOF2</a>&nbsp;&nbsp;&nbsp;0xC2</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="jpegSize_8cpp.html#a7f09d1c601661800967c5d7e447d5a1f">M_SOF3</a>&nbsp;&nbsp;&nbsp;0xC3</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="jpegSize_8cpp.html#ace7276c4a30808cd6fe74abda2f16ad6">M_SOF5</a>&nbsp;&nbsp;&nbsp;0xC5</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="jpegSize_8cpp.html#a3f5a3446a533760babdfd4d0f775e97c">M_SOF6</a>&nbsp;&nbsp;&nbsp;0xC6</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="jpegSize_8cpp.html#a3805e83e6b1e8f52a78f1b6cb0668133">M_SOF7</a>&nbsp;&nbsp;&nbsp;0xC7</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="jpegSize_8cpp.html#a5a510cc3009a14911acbbe7ddb378776">M_SOF9</a>&nbsp;&nbsp;&nbsp;0xC9</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="jpegSize_8cpp.html#aa718681ce1acfa7622ad9776404cfa98">M_SOF10</a>&nbsp;&nbsp;&nbsp;0xCA</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="jpegSize_8cpp.html#a51ac607f59c2730811fd514561770966">M_SOF11</a>&nbsp;&nbsp;&nbsp;0xCB</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="jpegSize_8cpp.html#a8ba4457ac8573d317b4562303197c72e">M_SOF13</a>&nbsp;&nbsp;&nbsp;0xCD</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="jpegSize_8cpp.html#ae3a73495aaced1aacd8577dac2dbe22e">M_SOF14</a>&nbsp;&nbsp;&nbsp;0xCE</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="jpegSize_8cpp.html#a6e4ec1d092fa9aaaa3a8a18aa1ee4381">M_SOF15</a>&nbsp;&nbsp;&nbsp;0xCF</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="jpegSize_8cpp.html#ace3e2c7b5e5b844c165f813bb68a3d37">M_SOI</a>&nbsp;&nbsp;&nbsp;0xD8</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="jpegSize_8cpp.html#a43056e27046e8d6327320714a5a0b0f0">M_EOI</a>&nbsp;&nbsp;&nbsp;0xD9</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="jpegSize_8cpp.html#af5fdac2a556ee915b65b295faff22ead">M_SOS</a>&nbsp;&nbsp;&nbsp;0xDA</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="jpegSize_8cpp.html#ad451ca014ccbfa47701a7d4bebace89a">M_APP0</a>&nbsp;&nbsp;&nbsp;0xE0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="jpegSize_8cpp.html#a8f9c892cd81b369ded8e70dc9363043b">M_APP12</a>&nbsp;&nbsp;&nbsp;0xEC</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="jpegSize_8cpp.html#aee6946f4084da1cf5c9bc225b072c3e5">M_COM</a>&nbsp;&nbsp;&nbsp;0xFE</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="jpegSize_8cpp.html#a7032a5e02e3a69b9bb87efd768bffabc">READ_BINARY</a>&nbsp;&nbsp;&nbsp;&quot;rb&quot;</td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="jpegSize_8cpp.html#ac9692d87db7c729416c07817a3d884ef">process_SOFn</a> (int &amp;<a class="el" href="blur_8cpp.html#a2474a5474cbff19523a51eb1de01cda4">width</a>, int &amp;<a class="el" href="blur_8cpp.html#ad12fc34ce789bce6c8a05d8a17138534">height</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="jpegSize_8cpp.html#ac8503f8433f75c15d731b738830b8eb6">skip_variable</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="jpegSize_8cpp.html#a1a6d29eb9df11f99d0120690c59390cd">read_1_byte</a> (int *res)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="jpegSize_8cpp.html#ab72572dd497b42bbe207831d9e3a71e3">read_2_bytes</a> (unsigned int *res)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="jpegSize_8cpp.html#a03a794f9a32e547280feb641b6f482b7">first_marker</a> (int *res)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="jpegSize_8cpp.html#a3dc947c90667a67ece81b9e877575164">next_marker</a> (int *res)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="jpegSize_8cpp.html#a15dc90155bd20ad6b903b548af5690ae">getJPEGSize</a> (const char *filename, int &amp;<a class="el" href="blur_8cpp.html#a2474a5474cbff19523a51eb1de01cda4">width</a>, int &amp;<a class="el" href="blur_8cpp.html#ad12fc34ce789bce6c8a05d8a17138534">height</a>)</td></tr>
<tr><td colspan="2"><h2>Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">FILE *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="jpegSize_8cpp.html#af19157da745ecb3f2b088c8f3a10c0a7">infile</a></td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="ad451ca014ccbfa47701a7d4bebace89a"></a><!-- doxytag: member="jpegSize.cpp::M_APP0" ref="ad451ca014ccbfa47701a7d4bebace89a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define M_APP0&nbsp;&nbsp;&nbsp;0xE0</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="jpegSize_8cpp_source.html#l00042">42</a> of file <a class="el" href="jpegSize_8cpp_source.html">jpegSize.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a8f9c892cd81b369ded8e70dc9363043b"></a><!-- doxytag: member="jpegSize.cpp::M_APP12" ref="a8f9c892cd81b369ded8e70dc9363043b" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define M_APP12&nbsp;&nbsp;&nbsp;0xEC</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="jpegSize_8cpp_source.html#l00043">43</a> of file <a class="el" href="jpegSize_8cpp_source.html">jpegSize.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="aee6946f4084da1cf5c9bc225b072c3e5"></a><!-- doxytag: member="jpegSize.cpp::M_COM" ref="aee6946f4084da1cf5c9bc225b072c3e5" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define M_COM&nbsp;&nbsp;&nbsp;0xFE</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="jpegSize_8cpp_source.html#l00044">44</a> of file <a class="el" href="jpegSize_8cpp_source.html">jpegSize.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a43056e27046e8d6327320714a5a0b0f0"></a><!-- doxytag: member="jpegSize.cpp::M_EOI" ref="a43056e27046e8d6327320714a5a0b0f0" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define M_EOI&nbsp;&nbsp;&nbsp;0xD9</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="jpegSize_8cpp_source.html#l00040">40</a> of file <a class="el" href="jpegSize_8cpp_source.html">jpegSize.cpp</a>.</p>

<p>Referenced by <a class="el" href="jpegSize_8cpp_source.html#l00065">getJPEGSize()</a>.</p>

</div>
</div>
<a class="anchor" id="ae747795c32cea1314b49e9b7d65be454"></a><!-- doxytag: member="jpegSize.cpp::M_SOF0" ref="ae747795c32cea1314b49e9b7d65be454" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define M_SOF0&nbsp;&nbsp;&nbsp;0xC0</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="jpegSize_8cpp_source.html#l00026">26</a> of file <a class="el" href="jpegSize_8cpp_source.html">jpegSize.cpp</a>.</p>

<p>Referenced by <a class="el" href="jpegSize_8cpp_source.html#l00065">getJPEGSize()</a>.</p>

</div>
</div>
<a class="anchor" id="ab58d501dd163fdd0dee4ba6907e191a0"></a><!-- doxytag: member="jpegSize.cpp::M_SOF1" ref="ab58d501dd163fdd0dee4ba6907e191a0" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define M_SOF1&nbsp;&nbsp;&nbsp;0xC1</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="jpegSize_8cpp_source.html#l00027">27</a> of file <a class="el" href="jpegSize_8cpp_source.html">jpegSize.cpp</a>.</p>

<p>Referenced by <a class="el" href="jpegSize_8cpp_source.html#l00065">getJPEGSize()</a>.</p>

</div>
</div>
<a class="anchor" id="aa718681ce1acfa7622ad9776404cfa98"></a><!-- doxytag: member="jpegSize.cpp::M_SOF10" ref="aa718681ce1acfa7622ad9776404cfa98" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define M_SOF10&nbsp;&nbsp;&nbsp;0xCA</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="jpegSize_8cpp_source.html#l00034">34</a> of file <a class="el" href="jpegSize_8cpp_source.html">jpegSize.cpp</a>.</p>

<p>Referenced by <a class="el" href="jpegSize_8cpp_source.html#l00065">getJPEGSize()</a>.</p>

</div>
</div>
<a class="anchor" id="a51ac607f59c2730811fd514561770966"></a><!-- doxytag: member="jpegSize.cpp::M_SOF11" ref="a51ac607f59c2730811fd514561770966" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define M_SOF11&nbsp;&nbsp;&nbsp;0xCB</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="jpegSize_8cpp_source.html#l00035">35</a> of file <a class="el" href="jpegSize_8cpp_source.html">jpegSize.cpp</a>.</p>

<p>Referenced by <a class="el" href="jpegSize_8cpp_source.html#l00065">getJPEGSize()</a>.</p>

</div>
</div>
<a class="anchor" id="a8ba4457ac8573d317b4562303197c72e"></a><!-- doxytag: member="jpegSize.cpp::M_SOF13" ref="a8ba4457ac8573d317b4562303197c72e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define M_SOF13&nbsp;&nbsp;&nbsp;0xCD</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="jpegSize_8cpp_source.html#l00036">36</a> of file <a class="el" href="jpegSize_8cpp_source.html">jpegSize.cpp</a>.</p>

<p>Referenced by <a class="el" href="jpegSize_8cpp_source.html#l00065">getJPEGSize()</a>.</p>

</div>
</div>
<a class="anchor" id="ae3a73495aaced1aacd8577dac2dbe22e"></a><!-- doxytag: member="jpegSize.cpp::M_SOF14" ref="ae3a73495aaced1aacd8577dac2dbe22e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define M_SOF14&nbsp;&nbsp;&nbsp;0xCE</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="jpegSize_8cpp_source.html#l00037">37</a> of file <a class="el" href="jpegSize_8cpp_source.html">jpegSize.cpp</a>.</p>

<p>Referenced by <a class="el" href="jpegSize_8cpp_source.html#l00065">getJPEGSize()</a>.</p>

</div>
</div>
<a class="anchor" id="a6e4ec1d092fa9aaaa3a8a18aa1ee4381"></a><!-- doxytag: member="jpegSize.cpp::M_SOF15" ref="a6e4ec1d092fa9aaaa3a8a18aa1ee4381" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define M_SOF15&nbsp;&nbsp;&nbsp;0xCF</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="jpegSize_8cpp_source.html#l00038">38</a> of file <a class="el" href="jpegSize_8cpp_source.html">jpegSize.cpp</a>.</p>

<p>Referenced by <a class="el" href="jpegSize_8cpp_source.html#l00065">getJPEGSize()</a>.</p>

</div>
</div>
<a class="anchor" id="aeeeb620f261aa6b63448de940c7a7714"></a><!-- doxytag: member="jpegSize.cpp::M_SOF2" ref="aeeeb620f261aa6b63448de940c7a7714" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define M_SOF2&nbsp;&nbsp;&nbsp;0xC2</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="jpegSize_8cpp_source.html#l00028">28</a> of file <a class="el" href="jpegSize_8cpp_source.html">jpegSize.cpp</a>.</p>

<p>Referenced by <a class="el" href="jpegSize_8cpp_source.html#l00065">getJPEGSize()</a>.</p>

</div>
</div>
<a class="anchor" id="a7f09d1c601661800967c5d7e447d5a1f"></a><!-- doxytag: member="jpegSize.cpp::M_SOF3" ref="a7f09d1c601661800967c5d7e447d5a1f" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define M_SOF3&nbsp;&nbsp;&nbsp;0xC3</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="jpegSize_8cpp_source.html#l00029">29</a> of file <a class="el" href="jpegSize_8cpp_source.html">jpegSize.cpp</a>.</p>

<p>Referenced by <a class="el" href="jpegSize_8cpp_source.html#l00065">getJPEGSize()</a>.</p>

</div>
</div>
<a class="anchor" id="ace7276c4a30808cd6fe74abda2f16ad6"></a><!-- doxytag: member="jpegSize.cpp::M_SOF5" ref="ace7276c4a30808cd6fe74abda2f16ad6" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define M_SOF5&nbsp;&nbsp;&nbsp;0xC5</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="jpegSize_8cpp_source.html#l00030">30</a> of file <a class="el" href="jpegSize_8cpp_source.html">jpegSize.cpp</a>.</p>

<p>Referenced by <a class="el" href="jpegSize_8cpp_source.html#l00065">getJPEGSize()</a>.</p>

</div>
</div>
<a class="anchor" id="a3f5a3446a533760babdfd4d0f775e97c"></a><!-- doxytag: member="jpegSize.cpp::M_SOF6" ref="a3f5a3446a533760babdfd4d0f775e97c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define M_SOF6&nbsp;&nbsp;&nbsp;0xC6</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="jpegSize_8cpp_source.html#l00031">31</a> of file <a class="el" href="jpegSize_8cpp_source.html">jpegSize.cpp</a>.</p>

<p>Referenced by <a class="el" href="jpegSize_8cpp_source.html#l00065">getJPEGSize()</a>.</p>

</div>
</div>
<a class="anchor" id="a3805e83e6b1e8f52a78f1b6cb0668133"></a><!-- doxytag: member="jpegSize.cpp::M_SOF7" ref="a3805e83e6b1e8f52a78f1b6cb0668133" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define M_SOF7&nbsp;&nbsp;&nbsp;0xC7</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="jpegSize_8cpp_source.html#l00032">32</a> of file <a class="el" href="jpegSize_8cpp_source.html">jpegSize.cpp</a>.</p>

<p>Referenced by <a class="el" href="jpegSize_8cpp_source.html#l00065">getJPEGSize()</a>.</p>

</div>
</div>
<a class="anchor" id="a5a510cc3009a14911acbbe7ddb378776"></a><!-- doxytag: member="jpegSize.cpp::M_SOF9" ref="a5a510cc3009a14911acbbe7ddb378776" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define M_SOF9&nbsp;&nbsp;&nbsp;0xC9</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="jpegSize_8cpp_source.html#l00033">33</a> of file <a class="el" href="jpegSize_8cpp_source.html">jpegSize.cpp</a>.</p>

<p>Referenced by <a class="el" href="jpegSize_8cpp_source.html#l00065">getJPEGSize()</a>.</p>

</div>
</div>
<a class="anchor" id="ace3e2c7b5e5b844c165f813bb68a3d37"></a><!-- doxytag: member="jpegSize.cpp::M_SOI" ref="ace3e2c7b5e5b844c165f813bb68a3d37" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define M_SOI&nbsp;&nbsp;&nbsp;0xD8</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="jpegSize_8cpp_source.html#l00039">39</a> of file <a class="el" href="jpegSize_8cpp_source.html">jpegSize.cpp</a>.</p>

<p>Referenced by <a class="el" href="jpegSize_8cpp_source.html#l00149">first_marker()</a>.</p>

</div>
</div>
<a class="anchor" id="af5fdac2a556ee915b65b295faff22ead"></a><!-- doxytag: member="jpegSize.cpp::M_SOS" ref="af5fdac2a556ee915b65b295faff22ead" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define M_SOS&nbsp;&nbsp;&nbsp;0xDA</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="jpegSize_8cpp_source.html#l00041">41</a> of file <a class="el" href="jpegSize_8cpp_source.html">jpegSize.cpp</a>.</p>

<p>Referenced by <a class="el" href="jpegSize_8cpp_source.html#l00065">getJPEGSize()</a>.</p>

</div>
</div>
<a class="anchor" id="a79d8075203f66de43561298655e7066a"></a><!-- doxytag: member="jpegSize.cpp::NEXTBYTE" ref="a79d8075203f66de43561298655e7066a" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define NEXTBYTE</td>
          <td>(</td>
&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td>&nbsp;&nbsp;&nbsp;getc(<a class="el" href="jpegSize_8cpp.html#af19157da745ecb3f2b088c8f3a10c0a7">infile</a>)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="jpegSize_8cpp_source.html#l00018">18</a> of file <a class="el" href="jpegSize_8cpp_source.html">jpegSize.cpp</a>.</p>

<p>Referenced by <a class="el" href="jpegSize_8cpp_source.html#l00149">first_marker()</a>, <a class="el" href="jpegSize_8cpp_source.html#l00202">read_1_byte()</a>, and <a class="el" href="jpegSize_8cpp_source.html#l00216">read_2_bytes()</a>.</p>

</div>
</div>
<a class="anchor" id="a7032a5e02e3a69b9bb87efd768bffabc"></a><!-- doxytag: member="jpegSize.cpp::READ_BINARY" ref="a7032a5e02e3a69b9bb87efd768bffabc" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define READ_BINARY&nbsp;&nbsp;&nbsp;&quot;rb&quot;</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="jpegSize_8cpp_source.html#l00052">52</a> of file <a class="el" href="jpegSize_8cpp_source.html">jpegSize.cpp</a>.</p>

<p>Referenced by <a class="el" href="jpegSize_8cpp_source.html#l00065">getJPEGSize()</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a03a794f9a32e547280feb641b6f482b7"></a><!-- doxytag: member="jpegSize.cpp::first_marker" ref="a03a794f9a32e547280feb641b6f482b7" args="(int *res)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool first_marker </td>
          <td>(</td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>res</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="jpegSize_8cpp_source.html#l00149">149</a> of file <a class="el" href="jpegSize_8cpp_source.html">jpegSize.cpp</a>.</p>

<p>References <a class="el" href="jpegSize_8cpp_source.html#l00039">M_SOI</a>, and <a class="el" href="jpegSize_8cpp_source.html#l00018">NEXTBYTE</a>.</p>

<p>Referenced by <a class="el" href="jpegSize_8cpp_source.html#l00065">getJPEGSize()</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00150"></a>00150 {
<a name="l00151"></a>00151   <span class="keywordtype">int</span> c1, c2;
<a name="l00152"></a>00152   c1 = <a class="code" href="jpegSize_8cpp.html#a79d8075203f66de43561298655e7066a">NEXTBYTE</a>();
<a name="l00153"></a>00153   c2 = <a class="code" href="jpegSize_8cpp.html#a79d8075203f66de43561298655e7066a">NEXTBYTE</a>();
<a name="l00154"></a>00154   <span class="keywordflow">if</span> (c1 != 0xFF || c2 != <a class="code" href="jpegSize_8cpp.html#ace3e2c7b5e5b844c165f813bb68a3d37">M_SOI</a>)
<a name="l00155"></a>00155     <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00156"></a>00156   <span class="keywordflow">else</span>
<a name="l00157"></a>00157   {
<a name="l00158"></a>00158     *res = c2;
<a name="l00159"></a>00159     <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00160"></a>00160   }
<a name="l00161"></a>00161 }
</pre></div></p>

</div>
</div>
<a class="anchor" id="a15dc90155bd20ad6b903b548af5690ae"></a><!-- doxytag: member="jpegSize.cpp::getJPEGSize" ref="a15dc90155bd20ad6b903b548af5690ae" args="(const char *filename, int &amp;width, int &amp;height)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool getJPEGSize </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&nbsp;</td>
          <td class="paramname"> <em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&nbsp;</td>
          <td class="paramname"> <em>height</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="jpegSize_8cpp_source.html#l00065">65</a> of file <a class="el" href="jpegSize_8cpp_source.html">jpegSize.cpp</a>.</p>

<p>References <a class="el" href="jpegSize_8cpp_source.html#l00149">first_marker()</a>, <a class="el" href="jpegSize_8cpp_source.html#l00056">infile</a>, <a class="el" href="jpegSize_8cpp_source.html#l00040">M_EOI</a>, <a class="el" href="jpegSize_8cpp_source.html#l00026">M_SOF0</a>, <a class="el" href="jpegSize_8cpp_source.html#l00027">M_SOF1</a>, <a class="el" href="jpegSize_8cpp_source.html#l00034">M_SOF10</a>, <a class="el" href="jpegSize_8cpp_source.html#l00035">M_SOF11</a>, <a class="el" href="jpegSize_8cpp_source.html#l00036">M_SOF13</a>, <a class="el" href="jpegSize_8cpp_source.html#l00037">M_SOF14</a>, <a class="el" href="jpegSize_8cpp_source.html#l00038">M_SOF15</a>, <a class="el" href="jpegSize_8cpp_source.html#l00028">M_SOF2</a>, <a class="el" href="jpegSize_8cpp_source.html#l00029">M_SOF3</a>, <a class="el" href="jpegSize_8cpp_source.html#l00030">M_SOF5</a>, <a class="el" href="jpegSize_8cpp_source.html#l00031">M_SOF6</a>, <a class="el" href="jpegSize_8cpp_source.html#l00032">M_SOF7</a>, <a class="el" href="jpegSize_8cpp_source.html#l00033">M_SOF9</a>, <a class="el" href="jpegSize_8cpp_source.html#l00041">M_SOS</a>, <a class="el" href="jpegSize_8cpp_source.html#l00172">next_marker()</a>, <a class="el" href="jpegSize_8cpp_source.html#l00261">process_SOFn()</a>, <a class="el" href="jpegSize_8cpp_source.html#l00052">READ_BINARY</a>, and <a class="el" href="jpegSize_8cpp_source.html#l00237">skip_variable()</a>.</p>

<p>Referenced by <a class="el" href="imageTools_8cpp_source.html#l00201">getImageSize()</a>, and <a class="el" href="imageTools_8cpp_source.html#l00033">isJpeg()</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00066"></a>00066 {
<a name="l00067"></a>00067   <span class="comment">//open file</span>
<a name="l00068"></a>00068   <span class="keywordflow">if</span> ((<a class="code" href="jpegSize_8cpp.html#af19157da745ecb3f2b088c8f3a10c0a7">infile</a> = fopen(filename, <a class="code" href="jpegSize_8cpp.html#a7032a5e02e3a69b9bb87efd768bffabc">READ_BINARY</a>)) == NULL)
<a name="l00069"></a>00069     <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00070"></a>00070 
<a name="l00071"></a>00071   <span class="comment">//this is scan_JPEG_header (int verbose)</span>
<a name="l00072"></a>00072   <span class="comment">//Parse the marker stream until SOFn is seen;</span>
<a name="l00073"></a>00073   <span class="keywordtype">int</span> marker;
<a name="l00074"></a>00074   
<a name="l00075"></a>00075   <span class="comment">//Expect SOI at start of file</span>
<a name="l00076"></a>00076   <span class="keywordflow">if</span> (!<a class="code" href="jpegSize_8cpp.html#a03a794f9a32e547280feb641b6f482b7">first_marker</a>(&amp;marker))
<a name="l00077"></a>00077   {
<a name="l00078"></a>00078     fclose(<a class="code" href="jpegSize_8cpp.html#af19157da745ecb3f2b088c8f3a10c0a7">infile</a>);
<a name="l00079"></a>00079     <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00080"></a>00080   }
<a name="l00081"></a>00081     
<a name="l00082"></a>00082     <span class="comment">/* Scan miscellaneous markers until we reach SOFn. */</span>
<a name="l00083"></a>00083   <span class="keywordflow">for</span> (;;) 
<a name="l00084"></a>00084   {
<a name="l00085"></a>00085     <span class="keywordflow">if</span>(!<a class="code" href="jpegSize_8cpp.html#a3dc947c90667a67ece81b9e877575164">next_marker</a>(&amp;marker))
<a name="l00086"></a>00086     {
<a name="l00087"></a>00087       fclose(<a class="code" href="jpegSize_8cpp.html#af19157da745ecb3f2b088c8f3a10c0a7">infile</a>);
<a name="l00088"></a>00088       <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00089"></a>00089     }
<a name="l00090"></a>00090 
<a name="l00091"></a>00091     <span class="keywordflow">switch</span> (marker) 
<a name="l00092"></a>00092     {
<a name="l00093"></a>00093       <span class="comment">/* Note that marker codes 0xC4, 0xC8, 0xCC are not, and must not be,</span>
<a name="l00094"></a>00094 <span class="comment">       * treated as SOFn.  C4 in particular is actually DHT.</span>
<a name="l00095"></a>00095 <span class="comment">       */</span>
<a name="l00096"></a>00096     <span class="keywordflow">case</span> <a class="code" href="jpegSize_8cpp.html#ae747795c32cea1314b49e9b7d65be454">M_SOF0</a>:    <span class="comment">/* Baseline */</span>
<a name="l00097"></a>00097     <span class="keywordflow">case</span> <a class="code" href="jpegSize_8cpp.html#ab58d501dd163fdd0dee4ba6907e191a0">M_SOF1</a>:    <span class="comment">/* Extended sequential, Huffman */</span>
<a name="l00098"></a>00098     <span class="keywordflow">case</span> <a class="code" href="jpegSize_8cpp.html#aeeeb620f261aa6b63448de940c7a7714">M_SOF2</a>:    <span class="comment">/* Progressive, Huffman */</span>
<a name="l00099"></a>00099     <span class="keywordflow">case</span> <a class="code" href="jpegSize_8cpp.html#a7f09d1c601661800967c5d7e447d5a1f">M_SOF3</a>:    <span class="comment">/* Lossless, Huffman */</span>
<a name="l00100"></a>00100     <span class="keywordflow">case</span> <a class="code" href="jpegSize_8cpp.html#ace7276c4a30808cd6fe74abda2f16ad6">M_SOF5</a>:    <span class="comment">/* Differential sequential, Huffman */</span>
<a name="l00101"></a>00101     <span class="keywordflow">case</span> <a class="code" href="jpegSize_8cpp.html#a3f5a3446a533760babdfd4d0f775e97c">M_SOF6</a>:    <span class="comment">/* Differential progressive, Huffman */</span>
<a name="l00102"></a>00102     <span class="keywordflow">case</span> <a class="code" href="jpegSize_8cpp.html#a3805e83e6b1e8f52a78f1b6cb0668133">M_SOF7</a>:    <span class="comment">/* Differential lossless, Huffman */</span>
<a name="l00103"></a>00103     <span class="keywordflow">case</span> <a class="code" href="jpegSize_8cpp.html#a5a510cc3009a14911acbbe7ddb378776">M_SOF9</a>:    <span class="comment">/* Extended sequential, arithmetic */</span>
<a name="l00104"></a>00104     <span class="keywordflow">case</span> <a class="code" href="jpegSize_8cpp.html#aa718681ce1acfa7622ad9776404cfa98">M_SOF10</a>:   <span class="comment">/* Progressive, arithmetic */</span>
<a name="l00105"></a>00105     <span class="keywordflow">case</span> <a class="code" href="jpegSize_8cpp.html#a51ac607f59c2730811fd514561770966">M_SOF11</a>:   <span class="comment">/* Lossless, arithmetic */</span>
<a name="l00106"></a>00106     <span class="keywordflow">case</span> <a class="code" href="jpegSize_8cpp.html#a8ba4457ac8573d317b4562303197c72e">M_SOF13</a>:   <span class="comment">/* Differential sequential, arithmetic */</span>
<a name="l00107"></a>00107     <span class="keywordflow">case</span> <a class="code" href="jpegSize_8cpp.html#ae3a73495aaced1aacd8577dac2dbe22e">M_SOF14</a>:   <span class="comment">/* Differential progressive, arithmetic */</span>
<a name="l00108"></a>00108     <span class="keywordflow">case</span> <a class="code" href="jpegSize_8cpp.html#a6e4ec1d092fa9aaaa3a8a18aa1ee4381">M_SOF15</a>:   <span class="comment">/* Differential lossless, arithmetic */</span>      
<a name="l00109"></a>00109       <span class="keywordflow">if</span>(!<a class="code" href="jpegSize_8cpp.html#ac9692d87db7c729416c07817a3d884ef">process_SOFn</a>(<a class="code" href="blur_8cpp.html#a2474a5474cbff19523a51eb1de01cda4">width</a>, <a class="code" href="blur_8cpp.html#ad12fc34ce789bce6c8a05d8a17138534">height</a>))
<a name="l00110"></a>00110       {
<a name="l00111"></a>00111         fclose(<a class="code" href="jpegSize_8cpp.html#af19157da745ecb3f2b088c8f3a10c0a7">infile</a>);
<a name="l00112"></a>00112         <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00113"></a>00113       }
<a name="l00114"></a>00114       <span class="keywordflow">else</span>
<a name="l00115"></a>00115       {
<a name="l00116"></a>00116         fclose(<a class="code" href="jpegSize_8cpp.html#af19157da745ecb3f2b088c8f3a10c0a7">infile</a>);
<a name="l00117"></a>00117         <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00118"></a>00118       }
<a name="l00119"></a>00119     <span class="keywordflow">case</span> <a class="code" href="jpegSize_8cpp.html#af5fdac2a556ee915b65b295faff22ead">M_SOS</a>:     <span class="comment">/* stop before hitting compressed data */</span>
<a name="l00120"></a>00120     {
<a name="l00121"></a>00121       fclose(<a class="code" href="jpegSize_8cpp.html#af19157da745ecb3f2b088c8f3a10c0a7">infile</a>);
<a name="l00122"></a>00122       <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00123"></a>00123     }
<a name="l00124"></a>00124     <span class="keywordflow">case</span> <a class="code" href="jpegSize_8cpp.html#a43056e27046e8d6327320714a5a0b0f0">M_EOI</a>:     <span class="comment">/* in case it&#39;s a tables-only JPEG stream */</span>
<a name="l00125"></a>00125     {
<a name="l00126"></a>00126       fclose(<a class="code" href="jpegSize_8cpp.html#af19157da745ecb3f2b088c8f3a10c0a7">infile</a>);
<a name="l00127"></a>00127       <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00128"></a>00128     }
<a name="l00129"></a>00129     <span class="keywordflow">default</span>:      <span class="comment">/* Anything else just gets skipped */</span>
<a name="l00130"></a>00130       <a class="code" href="jpegSize_8cpp.html#ac8503f8433f75c15d731b738830b8eb6">skip_variable</a>();    <span class="comment">/* we assume it has a parameter count... */</span>
<a name="l00131"></a>00131       <span class="keywordflow">break</span>;
<a name="l00132"></a>00132     }
<a name="l00133"></a>00133   } <span class="comment">/* end loop */</span>
<a name="l00134"></a>00134 
<a name="l00135"></a>00135 
<a name="l00136"></a>00136 <span class="comment">//cout &lt;&lt; &quot;ERROR!\n&quot;;</span>
<a name="l00137"></a>00137 <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00138"></a>00138 
<a name="l00139"></a>00139 }
</pre></div></p>

</div>
</div>
<a class="anchor" id="a3dc947c90667a67ece81b9e877575164"></a><!-- doxytag: member="jpegSize.cpp::next_marker" ref="a3dc947c90667a67ece81b9e877575164" args="(int *res)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool next_marker </td>
          <td>(</td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>res</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="jpegSize_8cpp_source.html#l00172">172</a> of file <a class="el" href="jpegSize_8cpp_source.html">jpegSize.cpp</a>.</p>

<p>References <a class="el" href="jpegSize_8cpp_source.html#l00202">read_1_byte()</a>.</p>

<p>Referenced by <a class="el" href="jpegSize_8cpp_source.html#l00065">getJPEGSize()</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00173"></a>00173 {
<a name="l00174"></a>00174   <span class="keywordtype">int</span> c;
<a name="l00175"></a>00175   <span class="keywordtype">int</span> discarded_bytes = 0;
<a name="l00176"></a>00176 
<a name="l00177"></a>00177   <span class="comment">/* Find 0xFF byte; count and skip any non-FFs. */</span>
<a name="l00178"></a>00178   <span class="keywordflow">if</span>(!<a class="code" href="jpegSize_8cpp.html#a1a6d29eb9df11f99d0120690c59390cd">read_1_byte</a>(&amp;c))
<a name="l00179"></a>00179     <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00180"></a>00180   <span class="keywordflow">while</span> (c != 0xFF) 
<a name="l00181"></a>00181   {
<a name="l00182"></a>00182     discarded_bytes++;
<a name="l00183"></a>00183     <span class="keywordflow">if</span>(!<a class="code" href="jpegSize_8cpp.html#a1a6d29eb9df11f99d0120690c59390cd">read_1_byte</a>(&amp;c))
<a name="l00184"></a>00184       <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00185"></a>00185   }
<a name="l00186"></a>00186   <span class="comment">/* Get marker code byte, swallowing any duplicate FF bytes.  Extra FFs</span>
<a name="l00187"></a>00187 <span class="comment">   * are legal as pad bytes, so don&#39;t count them in discarded_bytes.</span>
<a name="l00188"></a>00188 <span class="comment">   */</span>
<a name="l00189"></a>00189   <span class="keywordflow">do</span> 
<a name="l00190"></a>00190   {
<a name="l00191"></a>00191     <span class="keywordflow">if</span>(!<a class="code" href="jpegSize_8cpp.html#a1a6d29eb9df11f99d0120690c59390cd">read_1_byte</a>(&amp;c))
<a name="l00192"></a>00192       <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00193"></a>00193   } <span class="keywordflow">while</span> (c == 0xFF);
<a name="l00194"></a>00194 
<a name="l00195"></a>00195 <span class="comment">//  if (discarded_bytes != 0) { cout &lt;&lt; &quot;Warning: garbage data found in JPEG file\n&quot;; }</span>
<a name="l00196"></a>00196 
<a name="l00197"></a>00197   *res = c;
<a name="l00198"></a>00198   <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00199"></a>00199 }
</pre></div></p>

</div>
</div>
<a class="anchor" id="ac9692d87db7c729416c07817a3d884ef"></a><!-- doxytag: member="jpegSize.cpp::process_SOFn" ref="ac9692d87db7c729416c07817a3d884ef" args="(int &amp;width, int &amp;height)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool process_SOFn </td>
          <td>(</td>
          <td class="paramtype">int &amp;&nbsp;</td>
          <td class="paramname"> <em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&nbsp;</td>
          <td class="paramname"> <em>height</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="jpegSize_8cpp_source.html#l00261">261</a> of file <a class="el" href="jpegSize_8cpp_source.html">jpegSize.cpp</a>.</p>

<p>References <a class="el" href="jpegSize_8cpp_source.html#l00202">read_1_byte()</a>, and <a class="el" href="jpegSize_8cpp_source.html#l00216">read_2_bytes()</a>.</p>

<p>Referenced by <a class="el" href="jpegSize_8cpp_source.html#l00065">getJPEGSize()</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00262"></a>00262 {
<a name="l00263"></a>00263   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> length;
<a name="l00264"></a>00264   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> image_height, image_width;
<a name="l00265"></a>00265   <span class="keywordtype">int</span> data_precision;
<a name="l00266"></a>00266   
<a name="l00267"></a>00267   <span class="keywordflow">if</span>(!<a class="code" href="jpegSize_8cpp.html#ab72572dd497b42bbe207831d9e3a71e3">read_2_bytes</a>(&amp;length) ||
<a name="l00268"></a>00268       !<a class="code" href="jpegSize_8cpp.html#a1a6d29eb9df11f99d0120690c59390cd">read_1_byte</a>(&amp;data_precision) ||
<a name="l00269"></a>00269       !<a class="code" href="jpegSize_8cpp.html#ab72572dd497b42bbe207831d9e3a71e3">read_2_bytes</a>(&amp;image_height) ||
<a name="l00270"></a>00270       !<a class="code" href="jpegSize_8cpp.html#ab72572dd497b42bbe207831d9e3a71e3">read_2_bytes</a>(&amp;image_width) )
<a name="l00271"></a>00271       <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00272"></a>00272 
<a name="l00273"></a>00273   <a class="code" href="blur_8cpp.html#a2474a5474cbff19523a51eb1de01cda4">width</a> = (int) image_width;
<a name="l00274"></a>00274   <a class="code" href="blur_8cpp.html#ad12fc34ce789bce6c8a05d8a17138534">height</a> = (int) image_height;
<a name="l00275"></a>00275   <span class="keywordflow">return</span> <span class="keyword">true</span>;   
<a name="l00276"></a>00276 }
</pre></div></p>

</div>
</div>
<a class="anchor" id="a1a6d29eb9df11f99d0120690c59390cd"></a><!-- doxytag: member="jpegSize.cpp::read_1_byte" ref="a1a6d29eb9df11f99d0120690c59390cd" args="(int *res)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool read_1_byte </td>
          <td>(</td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>res</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="jpegSize_8cpp_source.html#l00202">202</a> of file <a class="el" href="jpegSize_8cpp_source.html">jpegSize.cpp</a>.</p>

<p>References <a class="el" href="jpegSize_8cpp_source.html#l00018">NEXTBYTE</a>.</p>

<p>Referenced by <a class="el" href="jpegSize_8cpp_source.html#l00172">next_marker()</a>, <a class="el" href="jpegSize_8cpp_source.html#l00261">process_SOFn()</a>, and <a class="el" href="jpegSize_8cpp_source.html#l00237">skip_variable()</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00203"></a>00203 {
<a name="l00204"></a>00204   <span class="keywordtype">int</span> c = <a class="code" href="jpegSize_8cpp.html#a79d8075203f66de43561298655e7066a">NEXTBYTE</a>();
<a name="l00205"></a>00205   <span class="keywordflow">if</span> (c == EOF)
<a name="l00206"></a>00206     <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00207"></a>00207   <span class="keywordflow">else</span>
<a name="l00208"></a>00208   {
<a name="l00209"></a>00209     *res = c;
<a name="l00210"></a>00210     <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00211"></a>00211   }
<a name="l00212"></a>00212 }
</pre></div></p>

</div>
</div>
<a class="anchor" id="ab72572dd497b42bbe207831d9e3a71e3"></a><!-- doxytag: member="jpegSize.cpp::read_2_bytes" ref="ab72572dd497b42bbe207831d9e3a71e3" args="(unsigned int *res)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool read_2_bytes </td>
          <td>(</td>
          <td class="paramtype">unsigned int *&nbsp;</td>
          <td class="paramname"> <em>res</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="jpegSize_8cpp_source.html#l00216">216</a> of file <a class="el" href="jpegSize_8cpp_source.html">jpegSize.cpp</a>.</p>

<p>References <a class="el" href="jpegSize_8cpp_source.html#l00018">NEXTBYTE</a>.</p>

<p>Referenced by <a class="el" href="jpegSize_8cpp_source.html#l00261">process_SOFn()</a>, and <a class="el" href="jpegSize_8cpp_source.html#l00237">skip_variable()</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00217"></a>00217 {
<a name="l00218"></a>00218   <span class="keywordtype">int</span> c1, c2;
<a name="l00219"></a>00219   c1 = <a class="code" href="jpegSize_8cpp.html#a79d8075203f66de43561298655e7066a">NEXTBYTE</a>();
<a name="l00220"></a>00220   <span class="keywordflow">if</span> (c1 == EOF)
<a name="l00221"></a>00221     <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00222"></a>00222   c2 = <a class="code" href="jpegSize_8cpp.html#a79d8075203f66de43561298655e7066a">NEXTBYTE</a>();
<a name="l00223"></a>00223   <span class="keywordflow">if</span> (c2 == EOF)
<a name="l00224"></a>00224     <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00225"></a>00225   *res = (((<span class="keywordtype">unsigned</span> int) c1) &lt;&lt; 8) + ((<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>) c2);
<a name="l00226"></a>00226   <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00227"></a>00227 }
</pre></div></p>

</div>
</div>
<a class="anchor" id="ac8503f8433f75c15d731b738830b8eb6"></a><!-- doxytag: member="jpegSize.cpp::skip_variable" ref="ac8503f8433f75c15d731b738830b8eb6" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool skip_variable </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="jpegSize_8cpp_source.html#l00237">237</a> of file <a class="el" href="jpegSize_8cpp_source.html">jpegSize.cpp</a>.</p>

<p>References <a class="el" href="jpegSize_8cpp_source.html#l00202">read_1_byte()</a>, and <a class="el" href="jpegSize_8cpp_source.html#l00216">read_2_bytes()</a>.</p>

<p>Referenced by <a class="el" href="jpegSize_8cpp_source.html#l00065">getJPEGSize()</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00239"></a>00239 {
<a name="l00240"></a>00240   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> length;
<a name="l00241"></a>00241 
<a name="l00242"></a>00242   <span class="comment">/* Get the marker parameter length count */</span>
<a name="l00243"></a>00243   <span class="keywordflow">if</span>(!<a class="code" href="jpegSize_8cpp.html#ab72572dd497b42bbe207831d9e3a71e3">read_2_bytes</a>(&amp;length))
<a name="l00244"></a>00244     <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00245"></a>00245   <span class="comment">/* Length includes itself, so must be at least 2 */</span>
<a name="l00246"></a>00246   <span class="keywordflow">if</span> (length &lt; 2)
<a name="l00247"></a>00247     <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00248"></a>00248   length -= 2;
<a name="l00249"></a>00249   <span class="comment">/* Skip over the remaining bytes */</span>
<a name="l00250"></a>00250   <span class="keywordflow">while</span> (length &gt; 0) 
<a name="l00251"></a>00251   {
<a name="l00252"></a>00252     <span class="keywordtype">int</span> tmp;
<a name="l00253"></a>00253     <span class="keywordflow">if</span>(!<a class="code" href="jpegSize_8cpp.html#a1a6d29eb9df11f99d0120690c59390cd">read_1_byte</a>(&amp;tmp))
<a name="l00254"></a>00254       <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00255"></a>00255     length--;
<a name="l00256"></a>00256   }
<a name="l00257"></a>00257   <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00258"></a>00258 }
</pre></div></p>

</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="af19157da745ecb3f2b088c8f3a10c0a7"></a><!-- doxytag: member="jpegSize.cpp::infile" ref="af19157da745ecb3f2b088c8f3a10c0a7" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">FILE* <a class="el" href="jpegSize_8cpp.html#af19157da745ecb3f2b088c8f3a10c0a7">infile</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="jpegSize_8cpp_source.html#l00056">56</a> of file <a class="el" href="jpegSize_8cpp_source.html">jpegSize.cpp</a>.</p>

<p>Referenced by <a class="el" href="jpegSize_8cpp_source.html#l00065">getJPEGSize()</a>.</p>

</div>
</div>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
</body>
</html>