nn::jpeg::CTR::JpegMpEncoder::StartJpegEncoder Member Function#include <nn/jpeg.h>
size_t StartJpegEncoder(
u8 * dst,
size_t limit,
const void * src,
u32 width,
u32 height,
u32 quality,
PixelSampling dstPixelSampling,
PixelFormat srcPixelFormat,
bool addThumbnail
);
| Name | Description | |
|---|---|---|
| out | dst | Specifies the buffer that stores the encoded result. |
| in | limit | Specifies the size of dst in bytes. Encoding fails if it exceeds this size. |
| in | src | Specifies the buffer of image data to encode. Must be 4-byte aligned. |
| in | width | Specifies the image width in pixels. (Up to 65536) |
| in | height | Specifies the image height in pixels. (Up to 65536) |
| in | quality | Specifies the encoding quality. Values can be set from 1-100, 100 being the highest quality and the largest size. |
| in | dstPixelSampling | Specifies the image's output format (its pixel sampling). |
| in | srcPixelFormat | Specifies the input pixel format of the image to encode. |
| in | addThumbnail | Specifies whether to add a thumbnail. |
0.GetLastError function to get the reason for failure. Runs the JPEG encoder.
The widths and heights of images that this function can encode depend on the output format of the image (in other words, the dstPixelSampling argument).
If PIXEL_SAMPLING_YUV444 is specified, both the vertical and horizontal size of the image must be a multiple of 8.
If PIXEL_SAMPLING_YUV420 is specified, both the vertical and horizontal size of the image must be a multiple of 16.
If PIXEL_SAMPLING_YUV422 is specified, the height must be a multiple of 8, and the width must be a multiple of 16.
CONFIDENTIAL