[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/2] image: add support for specified :background on GIF
From: |
Julien Danjou |
Subject: |
[PATCH 2/2] image: add support for specified :background on GIF |
Date: |
Wed, 27 Oct 2010 17:00:51 +0200 |
Signed-off-by: Julien Danjou <address@hidden>
---
src/ChangeLog | 1 +
src/image.c | 9 ++++++++-
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/src/ChangeLog b/src/ChangeLog
index 3d9b6bf..65d2730 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,6 +1,7 @@
2010-10-27 Julien Danjou <address@hidden>
* image.c (gif_load): Add support for transparency.
+ (gif_load): Add support for specified :background.
2010-10-26 Juanma Barranquero <address@hidden>
diff --git a/src/image.c b/src/image.c
index e9b85fa..ef6a6d0 100644
--- a/src/image.c
+++ b/src/image.c
@@ -7235,7 +7235,14 @@ gif_load (struct frame *f, struct image *img)
for (i = 0; i < gif_color_map->ColorCount; ++i)
{
if (transparent_p && transparency_color_index == i)
- pixel_colors[i] = FRAME_BACKGROUND_PIXEL (f);
+ {
+ Lisp_Object specified_bg
+ = image_spec_value (img->spec, QCbackground, NULL);
+ if (STRINGP (specified_bg))
+ pixel_colors[i] = x_alloc_image_color (f, img, specified_bg,
FRAME_BACKGROUND_PIXEL (f));
+ else
+ pixel_colors[i] = FRAME_BACKGROUND_PIXEL (f);
+ }
else
{
int r = gif_color_map->Colors[i].Red << 8;
--
1.7.2.3