From: Julien Danjou <julien@danjou.info>
To: emacs-devel@gnu.org
Cc: Julien Danjou <julien@danjou.info>
Subject: [PATCH 2/2] image: add support for specified :background on GIF
Date: Wed, 27 Oct 2010 16:27:33 +0200 [thread overview]
Message-ID: <1288189653-904-2-git-send-email-julien@danjou.info> (raw)
In-Reply-To: <1288189653-904-1-git-send-email-julien@danjou.info>
Signed-off-by: Julien Danjou <julien@danjou.info>
---
src/ChangeLog | 1 +
src/image.c | 10 +++++++++-
2 files changed, 10 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 <julien@danjou.info>
* image.c (gif_load): Add support for transparency.
+ (gif_load): Add support for specified :background.
2010-10-26 Juanma Barranquero <lekktu@gmail.com>
diff --git a/src/image.c b/src/image.c
index 8a32aaf..5bdba51 100644
--- a/src/image.c
+++ b/src/image.c
@@ -7231,7 +7231,15 @@ gif_load (struct frame *f, struct image *img)
for (i = 0; i < gif_color_map->ColorCount; ++i)
{
if (transparency_color_index == i)
- pixel_colors[i] = FRAME_BACKGROUND_PIXEL (f);
+ {
+ XColor color;
+ 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
next prev parent reply other threads:[~2010-10-27 14:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-27 14:27 [PATCH 1/2] image: add support for GIF transparency Julien Danjou
2010-10-27 14:27 ` Julien Danjou [this message]
2010-10-27 14:57 ` Julien Danjou
2010-10-27 15:00 ` Julien Danjou
2010-11-03 20:09 ` Chong Yidong
2010-11-04 1:44 ` YAMAMOTO Mitsuharu
2010-11-04 23:01 ` Miles Bader
2010-10-27 15:00 ` [PATCH 2/2] image: add support for specified :background on GIF Julien Danjou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1288189653-904-2-git-send-email-julien@danjou.info \
--to=julien@danjou.info \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.