diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2014-11-20 12:32:01 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2017-03-08 11:27:55 +0100 |
commit | f2c664a04fa6cf49b3719a0cc4c59f57bab04948 (patch) | |
tree | f0f9fe151dcb2260b953d3bc840bae6b3796a1a6 /rd/read-xwd.c | |
parent | f897a5ee212491ea5d0560eeb1ca4f6bcfbfe111 (diff) | |
download | fbida-f2c664a04fa6cf49b3719a0cc4c59f57bab04948.tar.gz |
use pixman images for storage
Diffstat (limited to 'rd/read-xwd.c')
-rw-r--r-- | rd/read-xwd.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/rd/read-xwd.c b/rd/read-xwd.c index c266624..afaa615 100644 --- a/rd/read-xwd.c +++ b/rd/read-xwd.c @@ -344,12 +344,11 @@ parse_ximage(struct ida_image *dest, XImage *src) memset(dest,0,sizeof(*dest)); dest->i.width = src->width; dest->i.height = src->height; - dest->data = malloc(dest->i.width * dest->i.height * 3); - memset(dest->data,0,dest->i.width * dest->i.height * 3); - + ida_image_alloc(dest); + for (y = 0; y < src->height; y++) { h.row = src->data + y*src->bytes_per_line; - xwd_parse(dest->data + 3*y*dest->i.width, y, &h); + xwd_parse(ida_image_scanline(dest, y), y, &h); } free(h.pix); } |