nn::jpeg::CTR::JpegMpDecoder::GetMpRegionsToBuildJpegData Member Function#include <nn/jpeg.h>
bool GetMpRegionsToBuildJpegData(
MpRegionsToBuildJpegData * pBuffer,
const u8 * src,
size_t srcSize
);
| Name | Description | |
|---|---|---|
| out | pBuffer | Specifies the buffer that stores the region information. |
| in | src | Specifies the start of the individual image data. |
| in | srcSize | Specifies the size of src in bytes. |
true on success. Returns false on failure.GetLastError function to get the reason for failure. This function gets region information required to rebuild JPEG data from the individual image data stored in MP format.
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.
Generally, [pointer to starting image + return value of GetMpImageOffset] is returned in the src argument, and the return value of GetMpImageSize is returned in the srcSize argument. Confirm beforehand that the region specified by src and srcSize is a valid region.
This function will fail if the MP type (MpTypeCode) of the individual image is MP_TYPE_CODE_LARGE_THUMBNAIL_IMAGE_CLASS_1 or MP_TYPE_CODE_LARGE_THUMBNAIL_IMAGE_CLASS_2, 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.
This function only partially performs decoding and shared processing. Consequently, there are some functions you cannot call immediately after calling this function: the GetLastWidth, GetLastHeight, GetLastOutputBufferWidth, and GetLastOutputBufferHeight functions, and all functions that get EXIF information, such as the GetLastDateTime function. Calls to these functions will have undefined return values.
CONFIDENTIAL