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<title>GetMpRegionsToBuildJpegData</title>
8  </head>
9  <body>
10<h1><CODE>nn::jpeg::CTR::JpegMpDecoder::GetMpRegionsToBuildJpegData</CODE> Member Function</h1>
11<h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">#include &lt;nn/jpeg.h&gt;
14bool GetMpRegionsToBuildJpegData(
15     <a href="../../../../nn/jpeg/CTR/MpRegionsToBuildJpegData/Overview.html">MpRegionsToBuildJpegData</a> * pBuffer,
16     const u8 * src,
17     size_t srcSize
18);
19</pre>
20    </div>
21<h2>Arguments</h2>
22    <div class="section">
23      <table class="arguments">
24        <thead>
25          <tr>
26            <td width="15" />
27<th>Name</th>
28<td>Description</td>
29          </tr>
30        </thead>
31        <tr>
32<td>out</td>
33<th>pBuffer</th>
34<td>Specifies the buffer that stores the region information.</td>
35        </tr>
36        <tr>
37<td>in</td>
38<th>src</th>
39<td>Specifies the start of the individual image data.</td>
40        </tr>
41        <tr>
42<td>in</td>
43<th>srcSize</th>
44<td>Specifies the size of <SPAN class="argument">src</SPAN> in bytes.</td>
45        </tr> </table>
46    </div>
47<h2>Return Values</h2>
48<div class="section">Returns <CODE>true</CODE> on success. Returns <CODE>false</CODE> on failure.<br />Use the <CODE><a href="../../../../nn/jpeg/CTR/JpegMpEncoder/GetLastError.html">GetLastError</a></CODE> function to get the reason for failure. </div>
49<h2>Description</h2>
50    <div class="section">
51<p>This function gets region information required to rebuild JPEG data from the individual image data stored in MP format.</p><p>Simply put, individual image data in MP format has this structure: [(JPEG header) + (APP2) + (JPEG data)], where APP2 includes the information associated with MP format. Leave out APP2 and you get [(JPEG header) + (JPEG data)], which is JPEG data not in the MP format. This function gets pointers and byte sizes for the (JPEG header) and (JPEG data) memory regions.</p><p>Generally, [pointer to starting image + return value of <CODE><a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetMpImageOffset.html">GetMpImageOffset</a></CODE>] is returned in the <SPAN class="argument">src</SPAN> argument, and the return value of <CODE><a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetMpImageSize.html">GetMpImageSize</a></CODE> is returned in the <SPAN class="argument">srcSize</SPAN> argument. Confirm beforehand that the region specified by <SPAN class="argument">src</SPAN> and <SPAN class="argument">srcSize</SPAN> is a valid region.</p><p>This function will fail if the MP type (<a href="../../../../nn/jpeg/CTR/MpTypeCode.html">MpTypeCode</a>) of the individual image is <a href="../../../../nn/jpeg/CTR/MpTypeCode.html">MP_TYPE_CODE_LARGE_THUMBNAIL_IMAGE_CLASS_1</a> or <a href="../../../../nn/jpeg/CTR/MpTypeCode.html">MP_TYPE_CODE_LARGE_THUMBNAIL_IMAGE_CLASS_2</a>, because these types of images are for display on monitors and do not include MP format-related information. Exif information might be omitted from images for display on monitors, so it is not suitable for use in rebuilding the JPEG data.</p><p>This function only partially performs decoding and shared processing. Consequently, there are some functions you cannot call immediately after calling this function: the <CODE><a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetLastWidth.html">GetLastWidth</a></CODE>, <CODE><a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetLastHeight.html">GetLastHeight</a></CODE>, <CODE><a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetLastOutputBufferWidth.html">GetLastOutputBufferWidth</a></CODE>, and <CODE><a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetLastOutputBufferHeight.html">GetLastOutputBufferHeight</a></CODE> functions, and all functions that get EXIF information, such as the <CODE><a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetLastDateTime.html">GetLastDateTime</a></CODE> function. Calls to these functions will have undefined return values.</p><!-- write here --></div>
52<h2>Revision History</h2>
53    <div class="section">
54      <dl class="history">
55        <dt>2010/10/21</dt>
56<dd>Initial version.<br />
57        </dd>
58      </dl>
59    </div>
60  <hr><p>CONFIDENTIAL</p></body>
61</html>
62