nn::jpeg::CTR::JpegMpEncoder::SetUserMakerNote Member Function#include <nn/jpeg.h>
void SetUserMakerNote(
const u8 * pBuffer,
size_t size
);
| Name | Description | |
|---|---|---|
| in | pBuffer | Specifies the data to embed. Specify NULL to clear the value. |
| in | size | Specifies the size in bytes of the data to embed. Specify 0 to clear this value. |
Registers various pieces of data to embed in the MakerNote part of a JPEG file.
To get embedded data, first decode the image or extract its Exif information, and then call the JpegMpDecoder::GetLastUserMakerNotePointer and JpegMpDecoder::GetLastUserMakerNoteSize functions.
・Maximum Size That Can Be Registered
The size of data that can be registered in the MakerNote depends on the overall size of the APP1 segment. The MakerNote is included in the Exif data and thus forms part of the APP1 segment, and this APP1 segment can only handle sizes up to 0xFFFF. As a result, the size of data that can be embedded in the MakerNote will vary with the size of the thumbnail and other data in the APP1 region. (As a guideline, we recommend that when you encode 640x480 images to have attached thumbnails, YUV422 format, and quality 90, you keep the MakerNote to a size leading to a total no greater than 0xE000.)
Call this function before calling the encoding function. Do not destroy the data to embed until after the encoding function completes. The values specified by this function are cleared after the encoding function completes, regardless of whether the encoding function succeeded or failed. When encoding multiple times, you must call this function before each encoding function call. The values specified by this function are also cleared if you specify NULL for the pBuffer argument, if you specify 0 for the size argument, or if you reinitialize the encoder object using the Initialize function.
CONFIDENTIAL