enesim  0.0.23.1
Drawinglibrary
Modules | Functions
Image

Image loading and saving. More...

Modules

 Definitions
 Context
 

Asynchronous context.


 File based loading and saving
 

Generic file loading and saving using the main context.


 Provider Descriptor
 

Allows the creation of new providers.


 Providers
 

Image format loader and saver provider.


 Finder Descriptor
 

Allows the creation of new providers.


 Finder
 

Image identification.


 Misc
 

Helper functions related to images.


Functions

EAPI void enesim_image_dispatch (void)
 Dispatch every asynchronous callback set on the main context.
EAPI Eina_Bool enesim_image_info_get (Enesim_Stream *s, const char *mime, int *w, int *h, Enesim_Buffer_Format *sfmt, const char *options, Eina_Error *err)
EAPI Eina_Bool enesim_image_load (Enesim_Stream *s, const char *mime, Enesim_Buffer **b, Enesim_Pool *mpool, const char *options, Eina_Error *err)
EAPI void enesim_image_load_async (Enesim_Stream *s, const char *mime, Enesim_Buffer *b, Enesim_Pool *mpool, Enesim_Image_Callback cb, void *user_data, const char *options)
EAPI Eina_Bool enesim_image_save (Enesim_Stream *s, const char *mime, Enesim_Buffer *b, const char *options, Eina_Error *err)
EAPI void enesim_image_save_async (Enesim_Stream *s, const char *mime, Enesim_Buffer *b, Enesim_Image_Callback cb, void *user_data, const char *options)

Detailed Description

Image loading and saving.


Function Documentation

EAPI void enesim_image_dispatch ( void  )

Dispatch every asynchronous callback set on the main context.

In case of requesting some asynchronous load or save, you must call this function to get the status of such process

EAPI Eina_Bool enesim_image_info_get ( Enesim_Stream data,
const char *  mime,
int *  w,
int *  h,
Enesim_Buffer_Format sfmt,
const char *  options,
Eina_Error *  err 
)

Gets information about an image

Parameters:
[in]dataThe image data
[in]mimeThe image mime
[out]wThe image width
[out]hThe image height
[out]sfmtThe image original format
[in]optionsAny option the provider might require
[out]errThe error in case the info loading fails
EAPI Eina_Bool enesim_image_load ( Enesim_Stream data,
const char *  mime,
Enesim_Buffer **  b,
Enesim_Pool mpool,
const char *  options,
Eina_Error *  err 
)

Load an image synchronously

Parameters:
[in]dataThe image data to load from
[in]mimeThe image mime. It can be NULL, if so, it will be autodetected from the data itself.
[out]bThe buffer to write the image pixels to. It must not be NULL.
[in]mpoolThe mempool that will create the buffer in case the buffer reference is NULL
[in]optionsAny option the provider might require
[out]errThe error in case the info loading fails
Returns:
EINA_TRUE in case the image was loaded correctly. EINA_FALSE if not
EAPI void enesim_image_load_async ( Enesim_Stream s,
const char *  mime,
Enesim_Buffer b,
Enesim_Pool mpool,
Enesim_Image_Callback  cb,
void *  data,
const char *  options 
)

Load an image asynchronously

Parameters:
[in]sThe image data to load from
[in]mimeThe image mime. It can be NULL, if so, it will be autodetected from the data itself.
[in]bThe buffer to write the image pixels to. It must not be NULL.
[in]mpoolThe mempool that will create the buffer in case the buffer reference is NULL
[in]cbThe function that will get called once the load is done
[in]dataUser provided data
[in]optionsAny option the provider might require
EAPI Eina_Bool enesim_image_save ( Enesim_Stream s,
const char *  mime,
Enesim_Buffer b,
const char *  options,
Eina_Error *  err 
)

Save an image synchronously

Parameters:
[in]sThe image data to save to
[in]mimeThe image mime
[in]bThe buffer to read the image pixels from. It must not be NULL.
[in]optionsAny option the provider might require
[out]errThe error in case the save fails
Returns:
EINA_TRUE in case the image was saved correctly. EINA_FALSE if not
EAPI void enesim_image_save_async ( Enesim_Stream s,
const char *  mime,
Enesim_Buffer b,
Enesim_Image_Callback  cb,
void *  data,
const char *  options 
)

Save an image asynchronously

Parameters:
[in]sThe image data to save to
[in]mimeThe image mime
[in]bThe buffer to read the image pixels from. It must not be NULL.
[in]cbThe function that will get called once the save is done
[in]dataUser provided data
[in]optionsAny option the provider might require
 All Data Structures Variables