Function that allow reading/saving image. More...
Data Structures | |
struct | _Emile_Image_Property |
struct | _Emile_Image_Animated |
struct | _Emile_Image_Load_Opts |
Typedefs | |
typedef Efl_Gfx_Colorspace | Emile_Colorspace |
typedef enum _Emile_Image_Encoding | Emile_Image_Encoding |
Flags that describe the supported encoding. More... | |
typedef enum _Emile_Image_Scale_Hint | Emile_Image_Scale_Hint |
Flags that describe the scale hint used by the loader infrastructure. More... | |
typedef enum _Emile_Image_Animated_Loop_Hint | Emile_Image_Animated_Loop_Hint |
Flags describing the behavior of animation from a loaded image. More... | |
typedef enum _Emile_Image_Load_Error | Emile_Image_Load_Error |
Emile image load error codes one can get - see emile_load_error_str() too. More... | |
typedef struct _Emile_Image | Emile_Image |
Internal type representing an opened image. More... | |
typedef struct _Emile_Image_Load_Opts | Emile_Image_Load_Opts |
Description of the possible load option. More... | |
typedef struct _Emile_Image_Animated | Emile_Image_Animated |
Description animation. More... | |
typedef struct _Emile_Image_Property | Emile_Image_Property |
Description of a loaded image property. More... | |
Enumerations | |
enum | _Emile_Image_Encoding { EMILE_IMAGE_LOSSLESS = 0, EMILE_IMAGE_JPEG = 1, EMILE_IMAGE_ETC1 = 2, EMILE_IMAGE_ETC2_RGB = 3, EMILE_IMAGE_ETC2_RGBA = 4, EMILE_IMAGE_ETC1_ALPHA = 5 } |
enum | _Emile_Image_Scale_Hint { EMILE_IMAGE_SCALE_HINT_NONE = 0, EMILE_IMAGE_SCALE_HINT_DYNAMIC = 1, EMILE_IMAGE_SCALE_HINT_STATIC = 2 } |
enum | _Emile_Image_Animated_Loop_Hint { EMILE_IMAGE_ANIMATED_HINT_NONE = 0, EMILE_IMAGE_ANIMATED_HINT_LOOP = 1, EMILE_IMAGE_ANIMATED_HINT_PINGPONG = 2 } |
enum | _Emile_Image_Load_Error { EMILE_IMAGE_LOAD_ERROR_NONE = 0, EMILE_IMAGE_LOAD_ERROR_GENERIC = 1, EMILE_IMAGE_LOAD_ERROR_DOES_NOT_EXIST = 2, EMILE_IMAGE_LOAD_ERROR_PERMISSION_DENIED = 3, EMILE_IMAGE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED = 4, EMILE_IMAGE_LOAD_ERROR_CORRUPT_FILE = 5, EMILE_IMAGE_LOAD_ERROR_UNKNOWN_FORMAT = 6 } |
Function that allow reading/saving image.
Flags that describe the supported encoding.
Some routine may not know all of them. The value are the same as the one provided before in Eet.h
Flags that describe the scale hint used by the loader infrastructure.
Flags describing the behavior of animation from a loaded image.
Emile image load error codes one can get - see emile_load_error_str() too.
Flags describing error state as discovered by an image loader.
Internal type representing an opened image.
Description of the possible load option.
Description animation.
Description of a loaded image property.
Emile_Image* emile_image_tgv_memory_open | ( | Eina_Binbuf * | source, |
Emile_Image_Load_Opts * | opts, | ||
Emile_Image_Animated * | animated, | ||
Emile_Image_Load_Error * | error | ||
) |
Open a TGV image from memory.
source | The Eina_Binbuf with TGV image in it. |
opts | Load option for the image to open (it can be NULL ). |
animated | Description of the image animation property, set during head reading and updated for each frame read by data (can be NULL ) |
error | Contain a valid error code if the function return NULL . |
NULL
.Emile_Image* emile_image_tgv_file_open | ( | Eina_File * | source, |
Emile_Image_Load_Opts * | opts, | ||
Emile_Image_Animated * | animated, | ||
Emile_Image_Load_Error * | error | ||
) |
Open a TGV image from a file.
source | The Eina_File with TGV image in it. |
opts | Load option for the image to open (it can be NULL ). |
animated | Description of the image animation property, set during head reading and updated for each frame read by data (can be NULL ) |
error | Contain a valid error code if the function return NULL . |
NULL
.Emile_Image* emile_image_jpeg_memory_open | ( | Eina_Binbuf * | source, |
Emile_Image_Load_Opts * | opts, | ||
Emile_Image_Animated * | animated, | ||
Emile_Image_Load_Error * | error | ||
) |
Open a JPEG image from memory.
source | The Eina_Binbuf with JPEG image in it. |
opts | Load option for the image to open (it can be NULL ). |
animated | Description of the image animation property, set during head reading and updated for each frame read by data (can be NULL ) |
error | Contain a valid error code if the function return NULL . |
NULL
.Emile_Image* emile_image_jpeg_file_open | ( | Eina_File * | source, |
Emile_Image_Load_Opts * | opts, | ||
Emile_Image_Animated * | animated, | ||
Emile_Image_Load_Error * | error | ||
) |
Open a JPEG image from file.
source | The Eina_File with JPEG image in it. |
opts | Load option for the image to open (it can be NULL ). |
animated | Description of the image animation property, set during head reading and updated for each frame read by data (can be NULL ) |
error | Contain a valid error code if the function return NULL . |
NULL
.Eina_Bool emile_image_head | ( | Emile_Image * | image, |
Emile_Image_Property * | prop, | ||
unsigned int | property_size, | ||
Emile_Image_Load_Error * | error | ||
) |
Read the header of an image to fill Emile_Image_Property.
image | The Emile_Image handler. |
prop | The Emile_Image_Property to be filled. |
property_size | The size of the Emile_Image_Property as known during compilation. |
error | Contain a valid error code if the function return NULL . |
EINA_TRUE
if the header was successfully readed and prop properly filled.References EINA_FALSE, and EMILE_IMAGE_LOAD_ERROR_NONE.
Eina_Bool emile_image_data | ( | Emile_Image * | image, |
Emile_Image_Property * | prop, | ||
unsigned int | property_size, | ||
void * | pixels, | ||
Emile_Image_Load_Error * | error | ||
) |
Read the pixels from an image file.
image | The Emile_Image handler. |
prop | The property to respect while reading this pixels. |
property_size | The size of the Emile_Image_Property as known during compilation. |
pixels | The actual pointer to the already allocated pixels buffer to fill. |
error | Contain a valid error code if the function return NULL . |
EINA_TRUE
if the data was successfully read and the pixels correctly filled.References EINA_FALSE, and EMILE_IMAGE_LOAD_ERROR_NONE.
void emile_image_close | ( | Emile_Image * | source | ) |
Close an opened image handler.
source | The handler to close. |
References eina_file_close().
const char* emile_load_error_str | ( | Emile_Image * | source, |
Emile_Image_Load_Error | error | ||
) |
Convert an error code related to an image handler into a meaningful string.
source | The handler related to the error (can be NULL ). |
error | The error code to get a message from. |
NULL
or by the library directly if it is.References EMILE_IMAGE_LOAD_ERROR_CORRUPT_FILE, EMILE_IMAGE_LOAD_ERROR_DOES_NOT_EXIST, EMILE_IMAGE_LOAD_ERROR_GENERIC, EMILE_IMAGE_LOAD_ERROR_NONE, EMILE_IMAGE_LOAD_ERROR_PERMISSION_DENIED, EMILE_IMAGE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED, and EMILE_IMAGE_LOAD_ERROR_UNKNOWN_FORMAT.