Dali 3D User Interface Engine
Classes | Functions
image-loaders.h File Reference
#include <dali/dali.h>
#include <dali/integration-api/bitmap.h>
#include "platform-abstractions/tizen/resource-loader/resource-loading-client.h"
#include "platform-abstractions/tizen/image-loaders/image-loader-input.h"
Include dependency graph for image-loaders.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  AutoCloseFile
 
struct  ImageDetails
 Structure to hold image details and the reference buffer. More...
 
struct  LoadFunctions
 A structure storing the methods that should be called when reading an image's header and when reading the bitmap from the image file. More...
 

Functions

void TestImageLoading (const ImageDetails &image, const LoadFunctions &functions, Dali::Integration::Bitmap::Profile bitmapProfile=Dali::Integration::Bitmap::BITMAP_2D_PACKED_PIXELS)
 Use this method to test the header and and bitmap loading of each image. More...
 
void CompareLoadedImageData (const ImageDetails &image, const LoadFunctions &functions, const uint32_t *master)
 Helper method to compare the resultant loaded image data of the specified image with a golden master data. More...
 
void DumpImageBufferToTempFile (std::string filename, std::string targetFilename, const LoadFunctions &functions)
 Helper function which should be used when first creating a reference buffer file. More...
 

Function Documentation

void CompareLoadedImageData ( const ImageDetails image,
const LoadFunctions functions,
const uint32_t *  master 
)

Helper method to compare the resultant loaded image data of the specified image with a golden master data.

Parameters
[in]imageThe image to load
[in]functionsThe functions to use to load the image
[in]masterGolden master data to compare the resultant loaded image with

Definition at line 136 of file image-loaders.cpp.

References Dali::Integration::Bitmap::BITMAP_2D_PACKED_PIXELS, DALI_TEST_CHECK, DALI_TEST_EQUALS(), Dali::Pixel::GetBytesPerPixel(), Dali::Integration::Bitmap::GetImageHeight(), Dali::Integration::Bitmap::GetImageWidth(), Dali::Integration::Bitmap::GetPixelFormat(), LoadFunctions::header, ImageDetails::height, height, LoadFunctions::loader, ImageDetails::name, Dali::Integration::Bitmap::New(), Dali::ResourcePolicy::OWNED_RETAIN, ImageDetails::refBufferSize, ImageDetails::reportedHeight, ImageDetails::reportedWidth, TEST_LOCATION, ImageDetails::width, and width.

Referenced by UtcDaliIco1bpp1alpha(), UtcDaliIco24bpp1alpha(), UtcDaliIco32bpp8alpha(), UtcDaliIco4bpp1alpha(), and UtcDaliIco8bpp1alpha().

Here is the call graph for this function:

Here is the caller graph for this function:

void DumpImageBufferToTempFile ( std::string  filename,
std::string  targetFilename,
const LoadFunctions functions 
)

Helper function which should be used when first creating a reference buffer file.

Set output file to a file in the /tmp/ directory e.g: DumpImageBufferToTempFile( "images/pattern.gif" , "/tmp/pattern.gif.buffer" );

Parameters
[in]filenameThe path of the image file.
[in]targetFilenameThe path of where the buffer should be written to. This should ideally be in the "/tmp" folder.
[in]functionsThe loader functions to call.

Definition at line 185 of file image-loaders.cpp.

References Dali::Integration::Bitmap::BITMAP_2D_PACKED_PIXELS, DALI_TEST_CHECK, Dali::Integration::Bitmap::GetBufferSize(), LoadFunctions::loader, Dali::Integration::Bitmap::New(), and Dali::ResourcePolicy::OWNED_RETAIN.

Here is the call graph for this function:

void TestImageLoading ( const ImageDetails image,
const LoadFunctions functions,
Dali::Integration::Bitmap::Profile  bitmapProfile = Dali::Integration::Bitmap::BITMAP_2D_PACKED_PIXELS 
)

Use this method to test the header and and bitmap loading of each image.

The loaded bitmap is then checked with the reference bitmap in ImageDetails.

Parameters
[in]imageThe image details.
[in]functionsThe loader functions that need to be called.
[in]bitmapProfileWhether or not the bitmap is raw

Definition at line 95 of file image-loaders.cpp.

References DALI_TEST_CHECK, DALI_TEST_EQUALS(), Dali::Integration::Bitmap::GetImageHeight(), Dali::Integration::Bitmap::GetImageWidth(), LoadFunctions::header, ImageDetails::height, height, LoadFunctions::loader, ImageDetails::name, Dali::Integration::Bitmap::New(), Dali::ResourcePolicy::OWNED_RETAIN, ImageDetails::refBuffer, ImageDetails::refBufferSize, ImageDetails::reportedHeight, ImageDetails::reportedWidth, TEST_LOCATION, TET_FAIL, tet_printf(), tet_result(), ImageDetails::width, and width.

Referenced by UtcDaliGifLoaderErrorBits(), UtcDaliGifLoaderInterlaced(), UtcDaliGifLoaderPattern(), and UtcDaliGifLoaderTransparency().

Here is the call graph for this function:

Here is the caller graph for this function:

Dali Docs Home
Read more about Dali