TCL_EncodeAndWritePicture(Ex)

Definition

#include <twl/tcl.h>


TCLResult TCL_EncodeAndWritePicture( TCLAccessor* pAccessor ,
                                     const void* imageBuffer ,
                                     u8* jpegBuffer ,
                                     u32 jpegBufferSize ,
                                     u8* workBuffer ,
                                     u32 quality ,
                                     u32 option ,
                                     FSResult* pFSResult );

TCLResult TCL_EncodeAndWritePictureEx( TCLAccessor* pAccessor ,
                                       const void* imageBuffer ,
                                       u8* jpegBuffer ,
                                       u32 jpegBufferSize ,
                                       u8* workBuffer ,
                                       u32 quality ,
                                       u32 option ,
                                       u8* makerNoteBuffer ,
                                       u16 makerNoteBufferSize ,
                                       FSResult* pFSResult );
	

Arguments

pAccessorAccessor
imageBufferSource image buffer
jpegBufferJPEG image buffer
jpegBufferSizeSize of the JPEG image buffer
workBufferJPEG encoding work buffer
qualityJPEG encoding quality
optionJPEG encoding option
makerNoteBufferUser maker note buffer
makerNoteBufferSizeUser maker note buffer size
pFSResultProcessing result when an error has been generated by an FS function inside this function

Return Values

Processing result

Description

Encodes the source image data in JPEG and saves the data. Calls the SSP_StartJpegEncoderFast function.

The source image must have VGA dimensions.

The work buffer should allocate the size determined by the TCL_GetJpegEncoderBufferSize function.

After encoding succeeds, saves to the JPEG image's next save path and overwrites the management file.

If this function returns TCL_RESULT_ERROR_NO_NEXT_INDEX, the JPEG image cannot be saved because of a path restriction. Note that this error is also returned when TCL_CalcNumEnableToTakePictures is greater than 0.

The accessor must be initialized by the TCL_LoadTable or TCL_CreateTable function.

If the encoding process failed because jpegBufferSize was small, quality was high, or for some other reason, the function will automatically lower quality internally and continue to retry until encoding is successful. If even lowering quality to its limit does not result in success, TCL_RESULT_ERROR_OTHER is returned.

See Also

TCL_GetJpegEncoderBufferSize

Revision History

2009/06/29 Changed the SSP function that is called.
2009/04/30 Changed the SSP function that is called.
2009/04/16 Added description of operations when the internal encoder fails.
2008/12/05 Initial version.


CONFIDENTIAL