image: realloc rather than delete/new

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-12-29 15:39:31 +01:00
parent 9f47cb4d01
commit c8b17808ef
1 changed files with 2 additions and 2 deletions

View File

@ -88,8 +88,8 @@ image_compute(image_t *image)
size = image->width * image->height;
p_delete(&image->data);
image->data = dataimg = p_new(uint8_t, size * 4);
p_realloc(&image->data, size * 4);
dataimg = image->data;
for(i = 0; i < size; i++, dataimg += 4)
{