Tizen Native API  3.0
Dali::EncodedBufferImage Class Reference

EncodedBufferImage represents an image resource as a buffer of encoded pixel data. More...

Inheritance diagram for Dali::EncodedBufferImage:
Dali::Image Dali::BaseHandle

Public Member Functions

 EncodedBufferImage ()
 Constructor which creates an uninitialized EncodedBufferImage object.
 ~EncodedBufferImage ()
 Destructor.
 EncodedBufferImage (const EncodedBufferImage &handle)
 This copy constructor is required for (smart) pointer semantics.
EncodedBufferImageoperator= (const EncodedBufferImage &rhs)
 This assignment operator is required for (smart) pointer semantics.

Static Public Member Functions

static EncodedBufferImage New (const uint8_t *const encodedImage, std::size_t encodedImageByteCount)
 Creates an initialized image object from an encoded image buffer in memory.
static EncodedBufferImage New (const uint8_t *const encodedImage, std::size_t encodedImageByteCount, ImageDimensions size, FittingMode::Type fittingMode, SamplingMode::Type samplingMode, bool orientationCorrection=true)
 Creates an initialized image object from an encoded image buffer in memory.
static EncodedBufferImage DownCast (BaseHandle handle)
 Downcasts a handle to EncodedBufferImage handle.

Detailed Description

EncodedBufferImage represents an image resource as a buffer of encoded pixel data.

A memory buffer of encoded image data is provided by the application and decoded asynchronously on a background thread to fill the image's pixel data.

The buffer of data provided to an EncodedBufferImage factory function (New) should be filled with encoded image data in one of Dali's supported image file formats, with the sequence of bytes in the buffer exactly matching the sequence of bytes that a file in the file system holding the encoded image data would have.

The application may free the encoded image buffer passed to one of the New() static factory member functions as soon as they return.

Signals

Image::LoadingFinishedSignal is emitted when the decoding of the image data is completed, either successfully or not.

Image::UploadedSignal is emitted when the decoded image data gets uploaded to the OpenGL ES implementation.

Since:
2.4, DALi version 1.0.0

Constructor & Destructor Documentation

Constructor which creates an uninitialized EncodedBufferImage object.

Use EncodedBufferImage::New to create an initialised object.

Since:
2.4, DALi version 1.0.0

Destructor.

This is non-virtual since derived Handle types must not contain data or virtual methods.

Since:
2.4, DALi version 1.0.0

This copy constructor is required for (smart) pointer semantics.

Since:
2.4, DALi version 1.0.0
Parameters:
[in]handleA reference to the copied handle

Member Function Documentation

Downcasts a handle to EncodedBufferImage handle.

If handle points to a EncodedBufferImage, the downcast produces valid handle. If not, the returned handle is left uninitialized.

Since:
2.4, DALi version 1.0.0
Parameters:
[in]handleHandle to an object
Returns:
Handle to a EncodedBufferImage or an uninitialized handle

Reimplemented from Dali::Image.

static EncodedBufferImage Dali::EncodedBufferImage::New ( const uint8_t *const  encodedImage,
std::size_t  encodedImageByteCount 
) [static]

Creates an initialized image object from an encoded image buffer in memory.

Since:
2.4, DALi version 1.0.0
Parameters:
[in]encodedImageThe encoded bytes of an image, in a supported image format such as PNG, JPEG, GIF, BMP, KTX, ICO, and WBMP, organised exactly as it would be as a file in the filesystem. The caller retains ownership of this buffer and is free to modify or discard it as soon as the function returns
[in]encodedImageByteCountThe size in bytes of the buffer pointed to by encodedImage.
Returns:
A handle to a newly allocated object
static EncodedBufferImage Dali::EncodedBufferImage::New ( const uint8_t *const  encodedImage,
std::size_t  encodedImageByteCount,
ImageDimensions  size,
FittingMode::Type  fittingMode,
SamplingMode::Type  samplingMode,
bool  orientationCorrection = true 
) [static]

Creates an initialized image object from an encoded image buffer in memory.

Since:
3.0, DALi version 1.1.4
Parameters:
[in]encodedImageThe encoded bytes of an image, in a supported image format such as PNG, JPEG, GIF, BMP, KTX, ICO, and WBMP, organised exactly as it would be as a file in the filesystem. The caller retains ownership of this buffer and is free to modify or discard it as soon as the function returns
[in]encodedImageByteCountThe size in bytes of the buffer pointed to by encodedImage
[in]sizeThe width and height to fit the loaded image to
[in]fittingModeThe method used to fit the shape of the image before loading to the shape defined by the size parameter
[in]samplingModeThe filtering method used when sampling pixels from the input image while fitting it to desired size
[in]orientationCorrectionReorient the image to respect any orientation metadata in its header policy is set, a reload will not be possible, so the Image should never be used once all actors using it have gone off-stage
Returns:
A handle to a newly allocated object
EncodedBufferImage& Dali::EncodedBufferImage::operator= ( const EncodedBufferImage rhs)

This assignment operator is required for (smart) pointer semantics.

Since:
2.4, DALi version 1.0.0
Parameters:
[in]rhsA reference to the copied handle
Returns:
A reference to this