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 <nn/jpeg.h> 14size_t StartMpEncoderNext( 15 const void * src, 16 u32 width, 17 u32 height, 18 u32 quality, 19 <a href="../../../../nn/jpeg/CTR/PixelSampling.html">PixelSampling</a> dstPixelSampling, 20 <a href="../../../../nn/jpeg/CTR/PixelFormat.html">PixelFormat</a> srcPixelFormat, 21 bool addThumbnail, 22 <a href="../../../../nn/jpeg/CTR/MpTypeCode.html">MpTypeCode</a> typeCode = MP_TYPE_CODE_MULTI_VIEW_DISPARITY_IMAGE, 23 bool omitPixelDimensions = false 24); 25</pre> 26 </div> 27<h2>Arguments</h2> 28 <div class="section"> 29 <table class="arguments"> 30 <thead> 31 <tr> 32 <td width="15" /> 33<th>Name</th> 34<td>Description</td> 35 </tr> 36 </thead> 37 <tr> 38<td>in</td> 39<th>src</th> 40<td>Specifies the buffer of image data to encode. Must be 4-byte aligned.</td> 41 </tr> 42 <tr> 43<td>in</td> 44<th>width</th> 45<td>Specifies the image width in pixels (equal to or less than 65536).</td> 46 </tr> 47 <tr> 48<td>in</td> 49<th>height</th> 50<td>Specifies the image height in pixels (equal to or less than 65536).</td> 51 </tr> 52 <tr> 53<td>in</td> 54<th>quality</th> 55<td>Specifies the encoding quality.<br />Values can be set from 1-100, 100 being the highest quality and the largest size.</td> 56 </tr> 57 <tr> 58<td>in</td> 59<th>dstPixelSampling</th> 60<td>Specifies the image's output format (its pixel sampling).</td> 61 </tr> 62 <tr> 63<td>in</td> 64<th>srcPixelFormat</th> 65<td>Specifies the input pixel format of the image to encode.</td> 66 </tr> 67 <tr> 68<td>in</td> 69<th>addThumbnail</th> 70<td>Specifies whether to add a thumbnail.</td> 71 </tr> 72 <tr> 73<td>in</td> 74<th>typeCode</th> 75<td>Specifies the MP type. Refer to Description for specifiable values. The default is <CODE>MP_TYPE_CODE_MULTI_VIEW_DISPARITY_IMAGE</CODE> (stereoscopic image).</td> 76 </tr> 77 <tr> 78<td>in</td> 79<th>omitPixelDimensions</th> 80<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>) in APP1.<br />This specification is ignored for other MP types, since for other types the size must always be recorded.<br />Specify <CODE>true</CODE> to omit recording it, or <CODE>false</CODE> to record it. The default value is <CODE>false</CODE>.</td> 81 </tr> </table> 82 </div> 83<h2>Return Values</h2> 84<div class="section">If the call is successful, the function returns the number of bytes of the generated MP. (However, this MP0 is not complete until the call has succeeded the required number of times.) 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> 85<h2>Description</h2> 86 <div class="section"> 87<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 processing fails, this function also fails. (You must re-encode from the first 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>, calls to functions that register the MP Attribute IFD have no effect.</p><p><UL> <LI> Any of the following values can be specified for the argument typeCode.</p><p><UL> <LI> <span>MP_TYPE_CODE_MULTI_VIEW_DISPARITY_IMAGE</span> (stereoscopic image)<LI> <span>MP_TYPE_CODE_MULTI_VIEW_PANORAMA_IMAGE</span> (panoramic image)<LI> <span>MP_TYPE_CODE_MULTI_VIEW_MULTI_ANGLE_IMAGE</span> (multi-angle image)<LI> <span>MP_TYPE_CODE_UNDEFINED</span> (undefined type)<LI> <span>MP_TYPE_CODE_LARGE_THUMBNAIL_IMAGE_CLASS_1</span> and <span>MP_TYPE_CODE_LARGE_THUMBNAIL_IMAGE_CLASS_2</span> (image for monitor display)</LI></UL></p><p>If something other than an image for monitor display is specified, it must be of the same MP type as the first image.</p><p></LI></UL></p><p>When encoding an image for monitor display, only the following tags are recorded in the APP1. 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.</p><p><UL> <LI> IFD0 の<UL> <LI> Exif IFD Pointer<LI> MakerNote of the Exif Private Tag (when storing manufacturer notes)<LI> PixelXDimension (*)<LI> PixelYDimension (*)<LI> ImageUniqueID (when storing unique image IDs)</LI></UL> <LI> IFD0: <UL> <LI> JPEGInterchangeFormat (when attaching thumbnails)<LI> JPEGInterchangeFormatLength (when attaching thumbnails)</LI></UL> </LI></UL></p><p>(*) 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> 88<h2>Revision History</h2> 89 <div class="section"> 90 <dl class="history"> 91 <dt>2010/10/22</dt> 92<dd>Made revisions to make descriptions easier to understand. 93 </dd> 94 <dt>2010/06/14</dt> 95<dd>Initial version.<br /> 96 </dd> 97 </dl> 98 </div> 99 <hr><p>CONFIDENTIAL</p></body> 100</html> 101