nn::jpeg::CTR NamespaceThe namespace of the CTR JPEG compression/decompression library.
(This namespace can also be written without the ::CTR portion.)
The nn::jpeg::JpegMpDecoder class can only decode JPEG data in baseline JPEG compression format.
The same applies to MP data formats.
In particular, decoding the following JPEG and MP formats will fail.
nn::jpeg::JpegMpEncoder class, even if it is in baseline JPEG compression format.
In versions of the SDK older than 3.2, the Y component references QT0 for DQT (the data quantization table), and the Cb and Cr components reference QT1. Images comprising other combinations were not decoded correctly, even when the decode function succeeded. For example, if only QT0 is defined and gets referenced by all of the image components, then all cases of QT1 will be treated as 0 and the image will appear monochrome. Decoding works correctly in SDK 3.2 and later.
If the data contains multiple APP1 sections, the Exif information that is found first is used and all other EXIF information is ignored. In SDK versions prior to version 3.2, a bug in the process for ignoring this information caused decoding to fail for images that had no Exif information in the first APP1 section. Decoding works correctly in SDK 3.2 and later. Even if the APP1 section contains Exif information, decoding will fail when JPEG or MP-format data has an offset to IFD0 other than 8.
The quality of an image degrades when it is encoded and then the result is decoded. We have confirmed that repeatedly encoding and decoding the same image causes noticeable degradation and emphasizes the green component of the image. Below is an example of a way to minimize this degradation. Implement it in your application if needed.
nn::jpeg::CTR::PIXEL_FORMAT_YUYV8 before editing or encoding the image. If this is not feasible, consider specifying 8-bit color components like nn::jpeg::CTR::PIXEL_FORMAT_RGB8 rather than nn::jpeg::CTR::PIXEL_FORMAT_CTR_RGB565.nn::jpeg::CTR::PIXEL_SAMPLING_YUV444 for pixel sampling when encoding. nn::jpeg::CTR::PIXEL_SAMPLING_YUV420 is the most susceptible to degradation of image quality.
nn::jpeg::CTR::JpegMpDecoder
|
This class performs JPEG decoding. |
|---|---|
nn::jpeg::CTR::JpegMpEncoder
|
This class performs JPEG encoding. |
nn::jpeg::CTR::MpIndex
|
Structure holding the MP Index IFD in a format easily processed by the library. The MP Index IFD is included in the data stored in MP format. |
|---|---|
nn::jpeg::CTR::MpEntry
|
Structure holding an MP entry in a format easily processed by the library. MP entries are included in the data stored in MP format. |
nn::jpeg::CTR::Rational
|
RATIONAL (unsigned rational number) data type, used for members of the MP Attribute IFD and GPS IFD. |
nn::jpeg::CTR::Srational
|
SRATIONAL (signed rational number) data type, used for members of the MP Attribute IFD and GPS IFD. |
nn::jpeg::CTR::MpAttribute
|
Structure holding the MP Attribute IFD in a format easily processed by the library. The MP Attribute IFD is included in the data stored in MP format. |
nn::jpeg::CTR::MpRegionsToBuildJpegData
|
Structure holding the region information (pointer and byte count) for rebuilding the JPEG data. |
| nn::jpeg::CTR::GpsData | This structure maintains GPS IFD in a format easily processed by the library. |
PixelSampling
|
Enumerated type indicating the output format when encoding. | |
|---|---|---|
PixelFormat
|
Enumerated type indicating the pixel format. | |
MpTypeFlag
|
Flag(s) included in the MP type information. | |
MpTypeDataFormat
|
Data format included in the MP type information. | |
MpTypeCode
|
Type code included in the MP type information. | |
| EncoderErrorCode | Gives the reason why the encoding just performed failed. | |
| DecoderErrorCode | Gives the reason why the decoding or other operation just performed failed. | |
| EncoderOption | Options used when encoding. | |
| DecoderOption | Options used when decoding. |
DATE_TIME_SIZE
|
const size_t | Number of bytes in the buffer that stores date and time information. This constant is a string with the format "YYYY:MM:DD HH:MM:DD" terminated with 0x00, for a total of 20 characters. |
|
|---|---|---|---|
IMAGE_UID_SIZE
|
const size_t | Number of bytes in the JPEG's unique image ID. This also represents the number of bytes in one element of the MP format's unique ID list for individual images. | |
| MPF_VERSION_SIZE | const size_t | The number of bytes of the MP format version. | |
MP_ENTRY_SIZE
|
const size_t | This constant represents the number of bytes in one element of an MP-format MP entry. This is not the number of bytes in the MpEntry structure. |
|
| GPS_VERSION_ID_SIZE | const size_t | The number of bytes of the GPS tag version. | |
| GPS_DATE_STAMP_SIZE | const size_t | The number of bytes in the GPS date stamp. | |
MIN_DECODER_SHRINK_LEVEL
|
const u32 | Minimum value that can be specified for the shrink level when shrink decoding. | |
MAX_DECODER_SHRINK_LEVEL
|
const u32 | Maximum value that can be specified for the shrink level when shrink decoding. | |
TWL_PHOTO_MAKER_NOTE_SIZE
|
const size_t | The number of bytes in a MakerNote for the Nintendo DSi Camera application. | |
MAX_DECODER_OUTPUT_BUFFER_WIDTH
|
const u32 | Maximum value (number of pixels) that can be specified for the output image buffer width when decoding. | |
MAX_ENCODER_INPUT_BUFFER_WIDTH
|
const u32 | Maximum value (number of pixels) that can be specified for the input image buffer width when encoding. | |
DEFAULT_THUMBNAIL_PIXEL_SAMPLING
|
const PixelSampling | Default thumbnail output format. | |
DEFAULT_THUMBNAIL_WIDTH
|
const u32 | Default thumbnail image width, in pixels. | |
DEFAULT_THUMBNAIL_HEIGHT
|
const u32 | Default thumbnail image height, in pixels. |
CONFIDENTIAL