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:
Gregor Best 2009-04-16 03:04:08 +02:00 committed by Julien Danjou
parent 92c482dbee
commit 4431d67679
1 changed files with 2 additions and 5 deletions

View File

@ -184,11 +184,8 @@ luaA_image_new(lua_State *L)
if(width <= 0 || height <= 0)
luaL_error(L, "request image has invalid size");
Imlib_Image imimage = imlib_create_image(width, height);
image_t *image = image_new(L);
image->image = imimage;
image_compute(image);
return 1;
uint32_t *data = p_new(uint32_t, width * height);
return image_new_from_argb32(width, height, data);
}
return 0;