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>StartMpEncoderNext</title>
8  </head>
9  <body>
10<h1><CODE>nn::jpeg::CTR::JpegMpEncoder::StartMpEncoderNext</CODE> Member Function</h1>
11<h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">#include &lt;nn/jpeg.h&gt;
14
15size_t StartMpEncoderNext(
16     const void * src,
17     u32 width,
18     u32 height,
19     u32 quality,
20     <a href="../../../../nn/jpeg/CTR/PixelSampling.html">PixelSampling</a> dstPixelSampling,
21     <a href="../../../../nn/jpeg/CTR/PixelFormat.html">PixelFormat</a> srcPixelFormat,
22     bool addThumbnail,
23     <a href="../../../../nn/jpeg/CTR/MpTypeCode.html">MpTypeCode</a> typeCode = MP_TYPE_CODE_MULTI_VIEW_DISPARITY_IMAGE,
24     bool omitPixelDimensions = false
25);
26</pre>
27    </div>
28<h2>Arguments</h2>
29    <div class="section">
30      <table class="arguments">
31        <thead>
32          <tr>
33            <td width="15" />
34<th>Name</th>
35<td>Description</td>
36          </tr>
37        </thead>
38        <tr>
39<td>in</td>
40<th>src</th>
41<td>Specifies the buffer of image data to encode. Must be 4-byte aligned.</td>
42        </tr>
43        <tr>
44<td>in</td>
45<th>width</th>
46<td>Specifies the image width in pixels. (Up to 65536)</td>
47        </tr>
48        <tr>
49<td>in</td>
50<th>height</th>
51<td>Specifies the image height in pixels. (Up to 65536)</td>
52        </tr>
53        <tr>
54<td>in</td>
55<th>quality</th>
56<td>Specifies the encoding quality.<br />Values can be set from 1-100, 100 being the highest quality and the largest size.</td>
57        </tr>
58        <tr>
59<td>in</td>
60<th>dstPixelSampling</th>
61<td>Specifies the image's output format (its pixel sampling).</td>
62        </tr>
63        <tr>
64<td>in</td>
65<th>srcPixelFormat</th>
66<td>Specifies the input pixel format of the image to encode.</td>
67        </tr>
68        <tr>
69<td>in</td>
70<th>addThumbnail</th>
71<td>Specifies whether to add a thumbnail.</td>
72        </tr>
73        <tr>
74<td>in</td>
75<th>typeCode</th>
76<td>Specifies the MP type. Can take any of the following values: <br /><SPAN>MP_TYPE_CODE_MULTI_VIEW_DISPARITY_IMAGE</SPAN> (stereoscopic image) <br /><span>MP_TYPE_CODE_MULTI_VIEW_PANORAMA_IMAGE</span> (panorama image) <br /><span>MP_TYPE_CODE_MULTI_VIEW_MULTI_ANGLE_IMAGE</span> (multi-angle image) <br /><span>MP_TYPE_CODE_UNDEFINED</span> (undefined type) <br /><span>MP_TYPE_CODE_LARGE_THUMBNAIL_IMAGE_CLASS_1</span> or <span>MP_TYPE_CODE_LARGE_THUMBNAIL_IMAGE_CLASS_2</span> (image for display on monitor) <br /> Except in the case of images for monitor display, the type specified here must be the same as the MP type at the starting the image.<br />The default is <CODE>MP_TYPE_CODE_MULTI_VIEW_DISPARITY_IMAGE</CODE> (stereoscopic image).</td>
77        </tr>
78        <tr>
79<td>in</td>
80<th>omitPixelDimensions</th>
81<td>When the MP type (the value of the <SPAN class="argument">typeCode</SPAN> argument) is <CODE>MP_TYPE_CODE_LARGE_THUMBNAIL_IMAGE_CLASS_1</CODE> or <CODE>MP_TYPE_CODE_LARGE_THUMBNAIL_IMAGE_CLASS_2</CODE> (image for monitor display), you must specify whether to omit recording the effective image size (<CODE>PixelXDimension</CODE>, <CODE>PixelYDimension</CODE>) to <CODE>APP1</CODE>.<br />This specification is ignored for other MP types, since the size must be recorded.<br />Specify <CODE>true</CODE> to omit recording, or <CODE>false</CODE> to record. The default value is <CODE>FALSE</CODE>.</td>
82        </tr> </table>
83    </div>
84<h2>Return Values</h2>
85<div class="section">If successful, returns the number of bytes in the generated MPO. (However, this MPO is in an incomplete state until the required number of function calls have completed successfully.) <br />Returns <CODE>0</CODE> on failure. Use the <CODE><a href="../../../../nn/jpeg/CTR/JpegMpEncoder/GetLastError.html">GetLastError</a></CODE> function to get the reason for failure. </div>
86<h2>Description</h2>
87    <div class="section">
88<p>JPEG-encodes an image and appends it to the encoded results from the immediately previous call to either <CODE><a href="../../../../nn/jpeg/CTR/JpegMpEncoder/StartMpEncoderFirst.html">StartMpEncoderFirst</a></CODE> or this function.</p><p>If that previous operation failed, this function also fails. (Encoding must be redone from the starting image.)</p><p>If the total number of images specified in the <CODE><a href="../../../../nn/jpeg/CTR/JpegMpEncoder/StartMpEncoderFirst.html">StartMpEncoderFirst</a></CODE> function is greater than 1, to complete the multi-picture object (MPO) this function must be called (total number of images - 1) number of times. Calling more than the required number of times will result in failure. If the function fails before encoding is complete or if encoding is cancelled, there is no further need to call this function.</p><p>Initializing the encoder object partway through encoding will prevent subsequent encoding results from being appended, so do not call the <CODE><a href="../../../../nn/jpeg/CTR/JpegMpEncoder/Initialize.html">Initialize</a></CODE> function before calling this function.</p><p>This function's encoding results are appended to the encoding results for the immediately previous image, within the limits of the buffer and byte size specified in the <CODE><a href="../../../../nn/jpeg/CTR/JpegMpEncoder/StartMpEncoderFirst.html">StartMpEncoderFirst</a></CODE> function. The data is padded so that the byte offset from the start of the buffer to the location where data is appended is a multiple of 2. Consequently, there is sometimes 1 byte of zeros inserted between the EOI marker of the previous individual image and the SOI marker for this individual image. No padding is added after appending.</p><p>Any data registered using <CODE><a href="../../../../nn/jpeg/CTR/JpegMpEncoder/SetUserMakerNote.html">SetUserMakerNote</a></CODE>, <CODE><a href="../../../../nn/jpeg/CTR/JpegMpEncoder/SetMpTypeFlags.html">SetMpTypeFlags</a></CODE>, <CODE><a href="../../../../nn/jpeg/CTR/JpegMpEncoder/SetDateTime.html">SetDateTime</a></CODE> or other functions, and any values specified in the <CODE><a href="../../../../nn/jpeg/CTR/JpegMpEncoder/SetThumbnailSize.html">SetThumbnailSize</a></CODE> or <CODE><a href="../../../../nn/jpeg/CTR/JpegMpEncoder/SetInputBufferWidth.html">SetInputBufferWidth</a></CODE> functions are cleared after this function completes, regardless of whether this function succeeded or failed. When encoding multiple times, you must call these functions before encoding each image.</p><p>When the starting image MP type is <CODE>MP_TYPE_CODE_BASELINE_MP_PRIMARY_IMAGE</CODE>, the baseline MP format is used so the MP attribute IFD is not stored. Just as with <CODE><a href="../../../../nn/jpeg/CTR/JpegMpEncoder/StartMpEncoderFirst.html">StartMpEncoderFirst</a></CODE>, calling functions to record the MP attribute IFD has no effect. </p><p>When the MP type is <CODE>MP_TYPE_CODE_LARGE_THUMBNAIL_IMAGE_CLASS_1</CODE> or <CODE>MP_TYPE_CODE_LARGE_THUMBNAIL_IMAGE_CLASS_2</CODE> (images for monitor display), only the following tags are recorded to <CODE>APP1</CODE>. You cannot use the <a href="../../../../nn/jpeg/CTR/JpegMpEncoder/GetMpRegionsToBuildJpegData.html"><CODE>GetMpRegionsToBuildJpegData</CODE></a> function to rebuild JPEG data, therefore, right after encoding images for monitor display. From IFD0: <CODE>Exif IFD Pointer</CODE>, <CODE>MakerNote</CODE> in the Exif Private Tag (when MakerNote is registered), <CODE>PixelXDimension(*)</CODE>, <CODE>PixelYDimension(*)</CODE>, <CODE>ImageUniqueID</CODE> (when unique image ID is registered). From IFD1: <CODE>JPEGInterchangeFormat</CODE> (when adding thumbnail), and <CODE>JPEGInterchangeFormatLength</CODE> (when adding thumbnail). (*) The MP format standard recommends that these tags not be recorded if the images are the same as the original monitor images. The application must check whether the size of the images for encoding (the <SPAN class="argument">width</SPAN> and <SPAN class="argument">height</SPAN> arguments) are the same as the original monitor images. These are not recorded if the <SPAN class="argument">omitPixelDimensions</SPAN> argument is set to <CODE>TRUE</CODE>.</p><!-- write here --></div>
89<h2>Revision History</h2>
90    <div class="section">
91      <dl class="history">
92        <dt>2010/06/14</dt>
93<dd>Initial version.<br />
94        </dd>
95      </dl>
96    </div>
97  <hr><p>CONFIDENTIAL</p></body>
98</html>