From 930713cf44bcae9a91f92a1582f329643d38abfd Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Sun, 3 Feb 2019 13:08:57 +0100 Subject: add gfxfmt, fixes --- readers.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'readers.c') diff --git a/readers.c b/readers.c index 24cb818..b7e8899 100644 --- a/readers.c +++ b/readers.c @@ -3,6 +3,7 @@ #include #include #include +#include #include "readers.h" @@ -130,8 +131,13 @@ int load_free_extras(struct ida_image_info *info) void ida_image_alloc(struct ida_image *img) { assert(img->p == NULL); - img->p = pixman_image_create_bits(/* PIXMAN_r8g8b8 */ PIXMAN_b8g8r8, - img->i.width, img->i.height, NULL, 0); + img->p = pixman_image_create_bits( +#if __BYTE_ORDER == __LITTLE_ENDIAN + PIXMAN_b8g8r8, +#else + PIXMAN_r8g8b8, +#endif + img->i.width, img->i.height, NULL, 0); } uint8_t *ida_image_scanline(struct ida_image *img, int y) -- cgit