# SSP_StartJpegDecoder

## Syntax

    BOOL SSP_StartJpegDecoder(u8* data, u32 size, void* dst, s16* width, s16* height, u32 option);

## Arguments

data | JPEG file to decode.
size | Size of the JPEG file to decode.
dst | Buffer used to store a decoded image. A buffer of the size width * height * 2 is required.
width | Maximum width allowed (in pixels) for the image to decode. When decoding has finished, the decoded image's width is stored here.
height | Maximum height allowed (in pixels) for the image to decode. When decoding has finished, the decoded image's height is stored here.
option | Decoding option (`SSP_JPEG_THUMBNAIL`).

## Return Values

Returns `TRUE` if successful.

## Description

Decodes a JPEG file into RGB555 image data. JPEG files can be decoded only from the YUV420, YUV422, and YUV444 formats.
If `SSP_JPEG_THUMBNAIL` is specified for option, this function decodes a thumbnail image. If nothing is specified (0 is specified), it decodes the main image.
Note:
This decoder is only guaranteed to decode JPEG files created using the SSP encoder.
Note that some JPEG files created with other software cannot be decoded.
Decoding often fails due to additional EXIF information.
When this happens, omit the EXIF information from the image .

## Revision History

2009/09/17 Added information about failed decoding of JPEG files.
2009/07/28 Revised the description of specifying options.
2009/01/09 Deleted the description of signatures.
2008/11/04 Added a description of when decoding fails.
2008/10/09 Added a description of configuring RSF files.
2008/09/15 Initial version.

CONFIDENTIAL