image: initialize new images
Signed-off-by: Gregor Best <farhaven@googlemail.com> Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
92c482dbee
commit
4431d67679
7
image.c
7
image.c
|
@ -184,11 +184,8 @@ luaA_image_new(lua_State *L)
|
||||||
if(width <= 0 || height <= 0)
|
if(width <= 0 || height <= 0)
|
||||||
luaL_error(L, "request image has invalid size");
|
luaL_error(L, "request image has invalid size");
|
||||||
|
|
||||||
Imlib_Image imimage = imlib_create_image(width, height);
|
uint32_t *data = p_new(uint32_t, width * height);
|
||||||
image_t *image = image_new(L);
|
return image_new_from_argb32(width, height, data);
|
||||||
image->image = imimage;
|
|
||||||
image_compute(image);
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue