1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
3  <head>
4    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5    <meta http-equiv="Content-Style-Type" content="text/css" />
6    <link rel="stylesheet" href="../../../css/manpage.css" type="text/css" />
7    <style type="text/css"><!--
8      span.static_style
9      {
10        font-size			: 8pt;
11        color				: white;
12        font-weight			: bold;
13        background			: #44f;
14        border-left			: solid 1px #aaf;
15        border-top			: solid 1px #aaf;
16        border-right		: solid 1px #00c;
17        border-bottom		: solid 1px #00c;
18        padding-left		: 2px;
19        padding-right		: 2px;
20      }
21      span.virtual_style
22      {
23        font-size			 : 8pt;
24        color				 : white;
25        font-weight			: bold;
26        background			: #0a0;
27        border-left			: solid 1px #0f0;
28        border-top			: solid 1px #0f0;
29        border-right		: solid 1px #060;
30        border-bottom		: solid 1px #060;
31        padding-left		: 2px;
32        padding-right		: 2px;
33      }
34      span.protected_style
35      {
36        font-size			 : 8pt;
37        color				 : white;
38        font-weight			: bold;
39        background			: #444;
40        border-left			: solid 1px #ccc;
41        border-top			: solid 1px #ccc;
42        border-right		: solid 1px #222;
43        border-bottom		: solid 1px #222;
44        padding-left		: 2px;
45        padding-right		: 2px;
46      }
47        --></style>
48<title>nn::jpeg::CTR</title>
49  </head>
50  <body>
51<h1><CODE><a href="../../../nn/Overview.html">nn</a>::<a href="../../../nn/jpeg/Overview.html">jpeg</a>::CTR</CODE> Namespace</h1>
52<h2>Description</h2>
53    <div class="section">
54<p>The <a href="../../../nn/jpeg/CTR/Overview.html">CTR</a> JPEG namespace. <br />(This can also be written without the <CODE>::CTR</CODE> portion.)</p><p>
55Decodable JPEG and MP Data Formats
56            </p><p>
57The <CODE>nn::jpeg::JpegMpDecoder</CODE> class can only decode JPEG data in baseline JPEG compression format.<br /><br />The same applies to MP data formats.<br /><br />In particular, decoding the following JPEG and MP formats will fail.
58<ul><li>Progressive</li><li>Uncompressed</li><li>Data that contains APP1 segments and the first APP1is not <CODE>Exif</CODE> information. When the data contains multiple APP1 segments, all APP1 segments are ignored, except for the first one.</li></ul>
59It may be unable to decode JPEG images created by other than the <CODE>nn::jpeg::JpegMpEncoder</CODE> class, even if it is in baseline JPEG compression format.<br /><br />If decoding fails, it may be possible to decode the image after removing the Exif data, the thumbnail, and APP<I>n</I> (where <I>n</I> is 0-15). In the case of data in MP format, however, keep APP2 segments with MP-format related information.
60            </p><p>
61For DQT (data quantization), the Y component references <CODE>QT0</CODE> and the Cb and Cr components reference <CODE>QT1</CODE>.<br />Images comprising other combinations will not be decoded correctly, even though the decode function may execute successfully. For example, if only <CODE>QT0</CODE> is defined and gets referenced by all of the image components, then all cases of <CODE>QT1</CODE> will be treated as <CODE>0</CODE> and the image will appear monochrome.
62            </p></div>
63    <a name="class" id="class">
64<h2>Classes</h2>
65      <div class="section">
66        <table class="members">
67          <tr>
68            <th>
69<a href="../../../nn/jpeg/CTR/JpegMpDecoder/Overview.html"><CODE>nn::jpeg::CTR::JpegMpDecoder</CODE></a>
70            </th>
71<td>This class performs JPEG decoding.</td>
72          </tr>
73          <tr>
74            <th>
75<a href="../../../nn/jpeg/CTR/JpegMpEncoder/Overview.html"><CODE>nn::jpeg::CTR::JpegMpEncoder</CODE></a>
76            </th>
77<td>This class performs JPEG encoding.</td>
78          </tr> </table>
79      </div>
80    </a> <a name="struct" id="struct">
81<h2>Structures</h2>
82      <div class="section">
83        <table class="members">
84          <tr>
85            <th>
86<a href="../../../nn/jpeg/CTR/MpIndex/Overview.html"><CODE>nn::jpeg::CTR::MpIndex</CODE></a>
87            </th>
88<td>Structure holding the MP Index IFD in a format easily processed by the library. The MP Index IFD is included in the data stored in MP format.</td>
89          </tr>
90          <tr>
91            <th>
92<a href="../../../nn/jpeg/CTR/MpEntry/Overview.html"><CODE>nn::jpeg::CTR::MpEntry</CODE></a>
93            </th>
94<td>Structure holding an MP entry in a format easily processed by the library. MP entries are included in the data stored in MP format.</td>
95          </tr>
96          <tr>
97            <th>
98<a href="../../../nn/jpeg/CTR/Rational/Overview.html"><CODE>nn::jpeg::CTR::Rational</CODE></a>
99            </th>
100<td><CODE>RATIONAL</CODE> (unsigned rational number) data type, used for members of the MP Attribute IFD and GPS IFD.</td>
101          </tr>
102          <tr>
103            <th>
104<a href="../../../nn/jpeg/CTR/Srational/Overview.html"><CODE>nn::jpeg::CTR::Srational</CODE></a>
105            </th>
106<td><CODE>SRATIONAL</CODE> (signed rational number) data type, used for members of the MP Attribute IFD and GPS IFD.</td>
107          </tr>
108          <tr>
109            <th>
110<a href="../../../nn/jpeg/CTR/MpAttribute/Overview.html"><CODE>nn::jpeg::CTR::MpAttribute</CODE></a>
111            </th>
112<td>Structure holding the MP Attribute IFD in a format easily processed by the library. The MP Attribute IFD is included in the data stored in MP format.</td>
113          </tr>
114          <tr>
115            <th>
116<a href="../../../nn/jpeg/CTR/MpRegionsToBuildJpegData/Overview.html"><CODE>nn::jpeg::CTR::MpRegionsToBuildJpegData</CODE></a>
117            </th>
118<td>Structure holding the region information (pointer and byte count) for rebuilding the JPEG data.</td>
119          </tr>
120          <tr>
121            <th>
122<a href="../../../nn/jpeg/CTR/GpsData/Overview.html">nn::jpeg::CTR::GpsData</a>
123            </th>
124<td>This structure maintains GPS IFD in a format easily processed by the library.</td>
125          </tr> </table>
126      </div>
127    </a> <a name="enum" id="enum">
128<h2>Enumerated Types</h2>
129      <div class="section">
130        <table class="members">
131          <tr>
132            <td width="100"> </td>
133            <th>
134<a href="../../../nn/jpeg/CTR/PixelSampling.html"><CODE>PixelSampling</CODE></a>
135            </th>
136<td>Enumerated type indicating the output format when encoding.</td>
137          </tr>
138          <tr>
139            <td width="100"> </td>
140            <th>
141<a href="../../../nn/jpeg/CTR/PixelFormat.html"><CODE>PixelFormat</CODE></a>
142            </th>
143<td>Enumerated type indicating the pixel format.</td>
144          </tr>
145          <tr>
146            <td width="100"> </td>
147            <th>
148<a href="../../../nn/jpeg/CTR/MpTypeFlag.html"><CODE>MpTypeFlag</CODE></a>
149            </th>
150<td>Flag(s) included in the MP type information.</td>
151          </tr>
152          <tr>
153            <td width="100"> </td>
154            <th>
155<a href="../../../nn/jpeg/CTR/MpTypeDataFormat.html"><CODE>MpTypeDataFormat</CODE></a>
156            </th>
157<td>Data format included in the MP type information.</td>
158          </tr>
159          <tr>
160            <td width="100"> </td>
161            <th>
162<a href="../../../nn/jpeg/CTR/MpTypeCode.html"><CODE>MpTypeCode</CODE></a>
163            </th>
164<td>Type code included in the MP type information.</td>
165          </tr>
166          <tr>
167            <td width="100"> </td>
168            <th>
169<a href="../../../nn/jpeg/CTR/EncoderErrorCode.html">EncoderErrorCode</a>
170            </th>
171<td>Gives the reason why the encoding just performed failed.</td>
172          </tr>
173          <tr>
174            <td width="100"> </td>
175            <th>
176<a href="../../../nn/jpeg/CTR/DecoderErrorCode.html">DecoderErrorCode</a>
177            </th>
178<td>Gives the reason why the decoding or other operation just performed failed.</td>
179          </tr>
180          <tr>
181            <td width="100"> </td>
182            <th>
183<a href="../../../nn/jpeg/CTR/EncoderOption.html">EncoderOption</a>
184            </th>
185<td>Options used when encoding.</td>
186          </tr>
187          <tr>
188            <td width="100"> </td>
189            <th>
190<a href="../../../nn/jpeg/CTR/DecoderOption.html">DecoderOption</a>
191            </th>
192<td>Options used when decoding.</td>
193          </tr> </table>
194      </div>
195    </a> <a name="constant" id="constant">
196<h2>Constants</h2>
197      <div class="section">
198        <table class="members">
199          <tr>
200            <td width="100"> </td>
201            <th>
202<span class="argument"><a href="../../../nn/jpeg/CTR/DATE_TIME_SIZE.html"><CODE>DATE_TIME_SIZE</CODE></a></span>
203            </th>
204<td width="100">const size_t</td>
205<td>Number of bytes in the buffer that stores date and time information. This constant is a string with the format &quot;<CODE>YYYY:MM:DD HH:MM:DD</CODE>&quot; terminated with <CODE>0x00</CODE>, for a total of 20 characters.</td>
206          </tr>
207          <tr>
208            <td width="100"> </td>
209            <th>
210<span class="argument"><a href="../../../nn/jpeg/CTR/IMAGE_UID_SIZE.html"><CODE>IMAGE_UID_SIZE</CODE></a></span>
211            </th>
212<td width="100">const size_t</td>
213<td>Number of bytes in the JPEG's unique image ID. This also represents the number of bytes in one element of the MP format's unique ID list for individual images.</td>
214          </tr>
215          <tr>
216            <td width="100"> </td>
217            <th>
218<span class="argument"><a href="../../../nn/jpeg/CTR/MPF_VERSION_SIZE.html">MPF_VERSION_SIZE</a></span>
219            </th>
220<td width="100">const size_t</td>
221<td>The number of bytes of the MP format version.</td>
222          </tr>
223          <tr>
224            <td width="100"> </td>
225            <th>
226<span class="argument"><a href="../../../nn/jpeg/CTR/MP_ENTRY_SIZE.html"><CODE>MP_ENTRY_SIZE</CODE></a></span>
227            </th>
228<td width="100">const size_t</td>
229<td>This constant represents the number of bytes in one element of an MP-format MP entry. This is not the number of bytes in the <CODE><a href="../../../nn/jpeg/CTR/MpEntry/Overview.html">MpEntry</a></CODE> structure.</td>
230          </tr>
231          <tr>
232            <td width="100"> </td>
233            <th>
234<span class="argument"><a href="../../../nn/jpeg/CTR/GPS_VERSION_ID_SIZE.html">GPS_VERSION_ID_SIZE</a></span>
235            </th>
236<td width="100">const size_t</td>
237<td>The number of bytes of the GPS tag version.</td>
238          </tr>
239          <tr>
240            <td width="100"> </td>
241            <th>
242<span class="argument"><a href="../../../nn/jpeg/CTR/GPS_DATE_STAMP_SIZE.html">GPS_DATE_STAMP_SIZE</a></span>
243            </th>
244<td width="100">const size_t</td>
245<td>The number of bytes in the GPS date stamp.</td>
246          </tr>
247          <tr>
248            <td width="100"> </td>
249            <th>
250<span class="argument"><a href="../../../nn/jpeg/CTR/MIN_DECODER_SHRINK_LEVEL.html"><CODE>MIN_DECODER_SHRINK_LEVEL</CODE></a></span>
251            </th>
252<td width="100">const u32</td>
253<td>Minimum value that can be specified for the shrink level when shrink decoding.</td>
254          </tr>
255          <tr>
256            <td width="100"> </td>
257            <th>
258<span class="argument"><a href="../../../nn/jpeg/CTR/MAX_DECODER_SHRINK_LEVEL.html"><CODE>MAX_DECODER_SHRINK_LEVEL</CODE></a></span>
259            </th>
260<td width="100">const u32</td>
261<td>Maximum value that can be specified for the shrink level when shrink decoding.</td>
262          </tr>
263          <tr>
264            <td width="100"> </td>
265            <th>
266<span class="argument"><a href="../../../nn/jpeg/CTR/TWL_PHOTO_MAKER_NOTE_SIZE.html"><CODE>TWL_PHOTO_MAKER_NOTE_SIZE</CODE></a></span>
267            </th>
268<td width="100">const size_t</td>
269<td>The number of bytes in a MakerNote for the Nintendo DSi Camera application.</td>
270          </tr>
271          <tr>
272            <td width="100"> </td>
273            <th>
274<span class="argument"><a href="../../../nn/jpeg/CTR/MAX_DECODER_OUTPUT_BUFFER_WIDTH.html"><CODE>MAX_DECODER_OUTPUT_BUFFER_WIDTH</CODE></a></span>
275            </th>
276<td width="100">const u32</td>
277<td>Maximum value (number of pixels) that can be specified for the output image buffer width when decoding.</td>
278          </tr>
279          <tr>
280            <td width="100"> </td>
281            <th>
282<span class="argument"><a href="../../../nn/jpeg/CTR/MAX_ENCODER_INPUT_BUFFER_WIDTH.html"><CODE>MAX_ENCODER_INPUT_BUFFER_WIDTH</CODE></a></span>
283            </th>
284<td width="100">const u32</td>
285<td>Maximum value (number of pixels) that can be specified for the input image buffer width when encoding.</td>
286          </tr>
287          <tr>
288            <td width="100"> </td>
289            <th>
290<span class="argument"><a href="../../../nn/jpeg/CTR/DEFAULT_THUMBNAIL_PIXEL_SAMPLING.html"><CODE>DEFAULT_THUMBNAIL_PIXEL_SAMPLING</CODE></a></span>
291            </th>
292<td width="100">const <a href="../../../nn/jpeg/CTR/PixelSampling.html">PixelSampling</a></td>
293<td>Default thumbnail output format.</td>
294          </tr>
295          <tr>
296            <td width="100"> </td>
297            <th>
298<span class="argument"><a href="../../../nn/jpeg/CTR/DEFAULT_THUMBNAIL_WIDTH.html"><CODE>DEFAULT_THUMBNAIL_WIDTH</CODE></a></span>
299            </th>
300<td width="100">const u32</td>
301<td>Default thumbnail image width, in pixels.</td>
302          </tr>
303          <tr>
304            <td width="100"> </td>
305            <th>
306<span class="argument"><a href="../../../nn/jpeg/CTR/DEFAULT_THUMBNAIL_HEIGHT.html"><CODE>DEFAULT_THUMBNAIL_HEIGHT</CODE></a></span>
307            </th>
308<td width="100">const u32</td>
309<td>Default thumbnail image height, in pixels.</td>
310          </tr> </table>
311      </div>
312    </a>
313<h2>Revision History</h2>
314    <div class="section">
315      <dl class="history">
316        <dt>2011/06/14</dt>
317<dd>Noted that in some cases the decode result will be monochrome.<br />
318        </dd>
319        <dt>2011/04/08</dt>
320<dd>Revised the description of data examples that will cause decode failure.<br />
321        </dd>
322        <dt>2011/03/04</dt>
323<dd>Added information about decodable JPEG and MP data formats.<br />
324        </dd>
325        <dt>2010/10/21</dt>
326<dd>Added descriptions of GpsData, EncoderErrorCode, DecoderErrorCode, EncoderOption, and DecoderOption.<br />
327        </dd>
328        <dt>2010/04/14</dt>
329<dd>Initial version.<br />
330        </dd>
331      </dl>
332    </div>
333  <hr><p>CONFIDENTIAL</p></body>
334</html>
335