From 66498bccf8111f4de0df977e0d4357681eac13e0 Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Sun, 8 Sep 2019 13:59:10 +0000 Subject: [PATCH] pngfb: Use correct fourcc format --- src/pngfb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pngfb.c b/src/pngfb.c index 91c6753..7734c51 100644 --- a/src/pngfb.c +++ b/src/pngfb.c @@ -84,10 +84,10 @@ int read_png_file(struct nvnc_fb* fb, const char *filename) { png_destroy_read_struct(&png, &info, NULL); fb->addr = addr; - fb->size = sizeof(row_bytes * height); + fb->size = width * height * 4; fb->width = width; fb->height = height; - fb->fourcc_format = DRM_FORMAT_ARGB8888; + fb->fourcc_format = DRM_FORMAT_ABGR8888; fb->fourcc_modifier = DRM_FORMAT_MOD_LINEAR; return 0;