nn::jpeg::CTR::JpegMpEncoder::SetInputBufferWidth Member Function#include <nn/jpeg.h>
void SetInputBufferWidth(
u32 width
);
| Name | Description | |
|---|---|---|
| in | width | Specifies the width (in pixels) of the input image buffer. Specify 0 to give priority to the value specified in the encoding function over this value.Any value specified in excess of MAX_ENCODER_INPUT_BUFFER_WIDTH (65536) is ignored. |
Sets the width of the input image buffer.
Use this function when the image buffer (for example, the GPU texture buffer) has a larger image width than the image you want to encode.
If you specify the image width of the input image buffer, the encoding function processes the input buffer starting from the left and discards any area beyond the specified width. When creating a thumbnail to add, the scaling-down operation is likewise carried out after cropping in this way.
Call this function before calling the encoding function. 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 0 for the width argument, or if you reinitialize the encoder object using the Initialize function.
If the image width specified by the encoding function is larger than the value specified in this function, the encoding function value takes priority.
The following limitations are placed on the argument width (values are rounded down to the given multiple at time of encoding) according to the input pixel format (PixelFormat) specified by the encode function.
PIXEL_FORMAT_CTR_RGB565_BLOCK8, PIXEL_FORMAT_CTR_RGB8_BLOCK8, or PIXEL_FORMAT_CTR_RGBA8_BLOCK8. CONFIDENTIAL