|width ||The width of the image. |
|height ||The height of the image. |
|data ||The data. |
- A valid image, otherwise NULL.
Creates an image from the image data specified with the width
and the height
specified. The image data
must be in the same format as imlib_image_get_data()
would return. You are responsible for freeing this image data once the image is freed - Imlib2 will not do that for you. This is useful for when you already have static buffers of the same format Imlib2 uses (many video grabbing devices use such a format) and wish to use Imlib2 to render the results onto another image, or X drawable. You should free the image when you are done with it. Imlib2 returns a valid image handle on success or NULL on failure
Definition at line 2528 of file imlib2.c.
ctx = imlib_context_new();
CHECK_PARAM_POINTER_RETURN("imlib_create_image_using_data", "data", data,
if ((width <= 0) || (height <= 0))
im = __imlib_CreateImage(width, height, data);
return (Imlib_Image) im;