Data Structures | Typedefs | Enumerations | Functions
Top level functions

Function that allow reading/saving image. More...

Data Structures

struct  _Emile_Image_Property
 
struct  _Emile_Image_Animated
 
struct  _Emile_Image_Load_Opts
 

Typedefs

typedef enum _Emile_Colorspace Emile_Colorspace
 Flags that describe all colorspace known by EFL. More...
 
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...
 
typedef enum _Emile_Action Emile_Action
 What action emile is referring to. More...
 
typedef Eina_Bool(* Emile_Action_Cb) (void *data, Emile_Image *image, Emile_Action action)
 A callback triggered by emile to learn what to do about a specific action. More...
 

Enumerations

enum  _Emile_Colorspace {
  EMILE_COLORSPACE_ARGB8888,
  EMILE_COLORSPACE_YCBCR422P601_PL,
  EMILE_COLORSPACE_YCBCR422P709_PL,
  EMILE_COLORSPACE_RGB565_A5P,
  EMILE_COLORSPACE_GRY8 = 4,
  EMILE_COLORSPACE_YCBCR422601_PL,
  EMILE_COLORSPACE_YCBCR420NV12601_PL,
  EMILE_COLORSPACE_YCBCR420TM12601_PL,
  EMILE_COLORSPACE_AGRY88 = 8,
  EMILE_COLORSPACE_ETC1 = 9,
  EMILE_COLORSPACE_RGB8_ETC2 = 10,
  EMILE_COLORSPACE_RGBA8_ETC2_EAC = 11,
  EMILE_COLORSPACE_ETC1_ALPHA = 12,
  EMILE_COLORSPACE_RGB_S3TC_DXT1 = 13,
  EMILE_COLORSPACE_RGBA_S3TC_DXT1 = 14,
  EMILE_COLORSPACE_RGBA_S3TC_DXT2 = 15,
  EMILE_COLORSPACE_RGBA_S3TC_DXT3 = 16,
  EMILE_COLORSPACE_RGBA_S3TC_DXT4 = 17,
  EMILE_COLORSPACE_RGBA_S3TC_DXT5 = 18
}
 
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,
  EMILE_IMAGE_LOAD_ERROR_CANCELLED = 7
}
 
enum  _Emile_Action {
  EMILE_ACTION_NONE = 0,
  EMILE_ACTION_CANCELLED = 1
}
 

Functions

Emile_Imageemile_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. More...
 
Emile_Imageemile_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. More...
 
Emile_Imageemile_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. More...
 
Emile_Imageemile_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. More...
 
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. More...
 
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. More...
 
void emile_image_callback_set (Emile_Image *image, Emile_Action_Cb callback, Emile_Action action, const void *data)
 Register a callback for emile to ask what to do during the processing of an image. More...
 
void emile_image_close (Emile_Image *source)
 Close an opened image handler. More...
 
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. More...
 

Detailed Description

Function that allow reading/saving image.

Typedef Documentation

◆ Emile_Colorspace

Flags that describe all colorspace known by EFL.

Some routine may not know all of them. All the value from below enum should be the same as in Evas_Loader.h

See also
Evas_Colorspace
Eet_Colorspace
Since
1.14

◆ Emile_Image_Encoding

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

See also
Eet_Image_Encoding
Since
1.14

◆ Emile_Image_Scale_Hint

Flags that describe the scale hint used by the loader infrastructure.

See also
Evas_Image_Scale_Hint
Since
1.14

◆ Emile_Image_Animated_Loop_Hint

Flags describing the behavior of animation from a loaded image.

See also
Evas_Image_Animated_Loop_Hint
Since
1.14

◆ Emile_Image_Load_Error

Emile image load error codes one can get - see emile_load_error_str() too.

Flags describing error state as discovered by an image loader.

See also
Evas_Load_Error
Since
1.14

◆ Emile_Image

Internal type representing an opened image.

Since
1.14

◆ Emile_Image_Load_Opts

Description of the possible load option.

Since
1.14

◆ Emile_Image_Animated

Description animation.

Since
1.14

◆ Emile_Image_Property

Description of a loaded image property.

Since
1.14

◆ Emile_Action

What action emile is referring to.

Since
1.19

◆ Emile_Action_Cb

Emile_Action_Cb

A callback triggered by emile to learn what to do about a specific action.

Since
1.19

Enumeration Type Documentation

◆ _Emile_Colorspace

Enumerator
EMILE_COLORSPACE_ARGB8888 

ARGB 32 bits per pixel, high-byte is Alpha, accessed 1 32bit word at a time.

EMILE_COLORSPACE_YCBCR422P601_PL 

YCbCr 4:2:2 Planar, ITU.BT-601 specifications.

The data pointed to is just an array of row pointer, pointing to the Y rows, then the Cb, then Cr rows

EMILE_COLORSPACE_YCBCR422P709_PL 

YCbCr 4:2:2 Planar, ITU.BT-709 specifications.

The data pointed to is just an array of row pointer, pointing to the Y rows, then the Cb, then Cr rows

EMILE_COLORSPACE_RGB565_A5P 

16bit rgb565 + Alpha plane at end - 5 bits of the 8 being used per alpha byte

EMILE_COLORSPACE_YCBCR422601_PL 

YCbCr 4:2:2, ITU.BT-601 specifications.

The data pointed to is just an array of row pointer, pointing to line of Y,Cb,Y,Cr bytes

EMILE_COLORSPACE_YCBCR420NV12601_PL 

YCbCr 4:2:0, ITU.BT-601 specification.

The data pointed to is just an array of row pointer, pointing to the Y rows, then the Cb,Cr rows.

EMILE_COLORSPACE_YCBCR420TM12601_PL 

YCbCr 4:2:0, ITU.BT-601 specification.

The data pointed to is just an array of tiled row pointer, pointing to the Y rows, then the Cb,Cr rows.

EMILE_COLORSPACE_AGRY88 

AY 8bits Alpha and 8bits Grey, accessed 1 16bits at a time.

EMILE_COLORSPACE_ETC1 

OpenGL ETC1 encoding of RGB texture (4 bit per pixel)

Since
1.10
EMILE_COLORSPACE_RGB8_ETC2 

OpenGL GL_COMPRESSED_RGB8_ETC2 texture compression format (4 bit per pixel)

Since
1.10
EMILE_COLORSPACE_RGBA8_ETC2_EAC 

OpenGL GL_COMPRESSED_RGBA8_ETC2_EAC texture compression format, supports alpha (8 bit per pixel)

Since
1.10
EMILE_COLORSPACE_ETC1_ALPHA 

ETC1 with alpha support using two planes: ETC1 RGB and ETC1 grey for alpha.

Since
1.11
EMILE_COLORSPACE_RGB_S3TC_DXT1 

OpenGL COMPRESSED_RGB_S3TC_DXT1_EXT format with RGB only.

Since
1.11
EMILE_COLORSPACE_RGBA_S3TC_DXT1 

OpenGL COMPRESSED_RGBA_S3TC_DXT1_EXT format with RGBA punchthrough.

Since
1.11
EMILE_COLORSPACE_RGBA_S3TC_DXT2 

DirectDraw DXT2 format with premultiplied RGBA.

Not supported by OpenGL itself.

Since
1.11
EMILE_COLORSPACE_RGBA_S3TC_DXT3 

OpenGL COMPRESSED_RGBA_S3TC_DXT3_EXT format with RGBA.

Since
1.11
EMILE_COLORSPACE_RGBA_S3TC_DXT4 

DirectDraw DXT4 format with premultiplied RGBA.

Not supported by OpenGL itself.

Since
1.11
EMILE_COLORSPACE_RGBA_S3TC_DXT5 

OpenGL COMPRESSED_RGBA_S3TC_DXT5_EXT format with RGBA.

Since
1.11

◆ _Emile_Image_Scale_Hint

Enumerator
EMILE_IMAGE_SCALE_HINT_NONE 

No scale hint at all.

EMILE_IMAGE_SCALE_HINT_DYNAMIC 

Image is being re-scaled over time, thus turning scaling cache off for its data.

EMILE_IMAGE_SCALE_HINT_STATIC 

Image is not being re-scaled over time, thus turning scaling cache on for its data.

◆ _Emile_Image_Load_Error

Enumerator
EMILE_IMAGE_LOAD_ERROR_NONE 

No error on load.

EMILE_IMAGE_LOAD_ERROR_GENERIC 

A non-specific error occurred.

EMILE_IMAGE_LOAD_ERROR_DOES_NOT_EXIST 

File (or file path) does not exist.

EMILE_IMAGE_LOAD_ERROR_PERMISSION_DENIED 

Permission denied to an existing file (or path)

EMILE_IMAGE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED 

Allocation of resources failure prevented load.

EMILE_IMAGE_LOAD_ERROR_CORRUPT_FILE 

File corrupt (but was detected as a known format)

EMILE_IMAGE_LOAD_ERROR_UNKNOWN_FORMAT 

File is not a known format.

EMILE_IMAGE_LOAD_ERROR_CANCELLED 

File loading has been cancelled.

Function Documentation

◆ emile_image_tgv_memory_open()

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.

Parameters
sourceThe Eina_Binbuf with TGV image in it.
optsLoad option for the image to open (it can be NULL).
animatedDescription of the image animation property, set during head reading and updated for each frame read by data (can be NULL)
errorContain a valid error code if the function return NULL.
Returns
a handler of the image if successfully opened, otherwise NULL.
Since
1.14

◆ emile_image_tgv_file_open()

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.

Parameters
sourceThe Eina_File with TGV image in it.
optsLoad option for the image to open (it can be NULL).
animatedDescription of the image animation property, set during head reading and updated for each frame read by data (can be NULL)
errorContain a valid error code if the function return NULL.
Returns
a handler of the image if successfully opened, otherwise NULL.
Since
1.14

◆ emile_image_jpeg_memory_open()

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.

Parameters
sourceThe Eina_Binbuf with JPEG image in it.
optsLoad option for the image to open (it can be NULL).
animatedDescription of the image animation property, set during head reading and updated for each frame read by data (can be NULL)
errorContain a valid error code if the function return NULL.
Returns
a handler of the image if successfully opened, otherwise NULL.
Since
1.14

◆ emile_image_jpeg_file_open()

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.

Parameters
sourceThe Eina_File with JPEG image in it.
optsLoad option for the image to open (it can be NULL).
animatedDescription of the image animation property, set during head reading and updated for each frame read by data (can be NULL)
errorContain a valid error code if the function return NULL.
Returns
a handler of the image if successfully opened, otherwise NULL.
Since
1.14

◆ emile_image_head()

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.

Parameters
imageThe Emile_Image handler.
propThe Emile_Image_Property to be filled.
property_sizeThe size of the Emile_Image_Property as known during compilation.
errorContain a valid error code if the function return NULL.
Returns
EINA_TRUE if the header was successfully readed and prop properly filled.
Since
1.14

References EINA_FALSE, and EMILE_IMAGE_LOAD_ERROR_NONE.

◆ emile_image_data()

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.

Parameters
imageThe Emile_Image handler.
propThe property to respect while reading this pixels.
property_sizeThe size of the Emile_Image_Property as known during compilation.
pixelsThe actual pointer to the already allocated pixels buffer to fill.
errorContain a valid error code if the function return NULL.
Returns
EINA_TRUE if the data was successfully read and the pixels correctly filled.
Since
1.14

References EINA_FALSE, and EMILE_IMAGE_LOAD_ERROR_NONE.

◆ emile_image_callback_set()

void emile_image_callback_set ( Emile_Image image,
Emile_Action_Cb  callback,
Emile_Action  action,
const void *  data 
)

Register a callback for emile to ask what to do during the processing of an image.

Parameters
imageThe Emile_Image handler to register on.
callbackThe callback to use
actionThe action this callback is triggered on.
Since
1.19

◆ emile_image_close()

void emile_image_close ( Emile_Image source)

Close an opened image handler.

Parameters
sourceThe handler to close.
Since
1.14

References eina_file_close().

◆ emile_load_error_str()

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.

Parameters
sourceThe handler related to the error (can be NULL).
errorThe error code to get a message from.
Returns
a string that will be owned by Emile, either by the handler if it is not NULL or by the library directly if it is.
Since
1.14

References EMILE_IMAGE_LOAD_ERROR_CANCELLED, 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.