[PATCH 3/4] Use background color from color scheme for PNGs

From: Alexis Hildebrandt <afh_AT_surryhill.net>
Date: Thu, 26 Nov 2015 15:03:25 +0100

---
 sent.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sent.c b/sent.c
index d6c2c0b..c9ce374 100644
--- a/sent.c
+++ b/sent.c
_AT_@ -210,7 +210,9 @@ int pngread(Image *img)
 				|| color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
 			png_set_gray_to_rgb(img->png_ptr);
 
-		png_color_16 my_background = {.red = 0xff, .green = 0xff, .blue = 0xff};
+		png_color_16 my_background = {.red = sc->bg.rgb.color.red>>8,
+		                              .green = sc->bg.rgb.color.green>>8,
+		                              .blue = sc->bg.rgb.color.blue>>8};
 		png_color_16p image_background;
 
 		if (png_get_bKGD(img->png_ptr, img->info_ptr, &image_background))
-- 
2.6.3
--7DO5AaGCk89r4vaK--
Received on Mon Sep 17 2001 - 00:00:00 CEST

This archive was generated by hypermail 2.3.0 : Thu Nov 26 2015 - 20:36:10 CET