nn::jpeg::CTR Namespace

Description

The CTR JPEG namespace.
(This can also be written without the ::CTR portion.)

Decodable JPEG and MP Data Formats

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.

It may be unable to decode JPEG images created by other than the nn::jpeg::JpegMpEncoder class, even if it is in baseline JPEG compression format.

If decoding fails, it may be possible to decode the image after removing the Exif data, the thumbnail, and APPn (where n is 0-15). In the case of data in MP format, however, keep APP2 segments with MP-format related information.

For DQT (data quantization), the Y component references QT0 and the Cb and Cr components reference QT1.
Images comprising other combinations will not be decoded correctly, even though the decode function may execute successfully. 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.

Classes

nn::jpeg::CTR::JpegMpDecoder This class performs JPEG decoding.
nn::jpeg::CTR::JpegMpEncoder This class performs JPEG encoding.

Structures

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.

Enumerated Types

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.

Constants

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.

Revision History

2011/06/14
Noted that in some cases the decode result will be monochrome.
2011/04/08
Revised the description of data examples that will cause decode failure.
2011/03/04
Added information about decodable JPEG and MP data formats.
2010/10/21
Added descriptions of GpsData, EncoderErrorCode, DecoderErrorCode, EncoderOption, and DecoderOption.
2010/04/14
Initial version.

CONFIDENTIAL