From f9a2ae5190c77e0214b00e5637d8e9e40e3d4eb1 Mon Sep 17 00:00:00 2001 From: Alex Taber Date: Wed, 23 Dec 2020 17:30:55 -0500 Subject: [PATCH] Fix RGB previews having inverted colors Closes #227 --- source/loading.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/loading.c b/source/loading.c index 138d5c3..ae42a56 100644 --- a/source/loading.c +++ b/source/loading.c @@ -497,7 +497,7 @@ bool load_preview_from_buffer(void * buf, u32 size, C2D_Image * preview_image, i if(color_type == PNG_COLOR_TYPE_RGB || color_type == PNG_COLOR_TYPE_GRAY || color_type == PNG_COLOR_TYPE_PALETTE) - png_set_filler(png, 0xFF, PNG_FILLER_AFTER); + png_set_add_alpha(png, 0xFF, PNG_FILLER_BEFORE); if(color_type == PNG_COLOR_TYPE_GRAY || color_type == PNG_COLOR_TYPE_GRAY_ALPHA)