changeset 101838:a4a5037b3040

(svg_load_image): Fix last change.
author Chong Yidong <cyd@stupidchicken.com>
date Fri, 06 Feb 2009 17:19:10 +0000
parents a308d330b349
children 1eedc742bd61
files src/image.c
diffstat 1 files changed, 9 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/image.c	Fri Feb 06 17:18:16 2009 +0000
+++ b/src/image.c	Fri Feb 06 17:19:10 2009 +0000
@@ -8079,17 +8079,8 @@
   /* Handle alpha channel by combining the image with a background
      color.  */
   specified_bg = image_spec_value (img->spec, QCbackground, NULL);
-  if (STRINGP (specified_bg)
-      && x_defined_color (f, SDATA (specified_bg), &background, 0))
-    {
-      /* SVG pixmaps specify transparency in the last byte, so right
-	 shift 8 bits to get rid of it, since emacs doesn't support
-	 transparency.  */
-      background.red   >>= 8;
-      background.green >>= 8;
-      background.blue  >>= 8;
-    }
-  else
+  if (!STRINGP (specified_bg)
+      || !x_defined_color (f, SDATA (specified_bg), &background, 0))
     {
 #ifndef HAVE_NS
       background.pixel = FRAME_BACKGROUND_PIXEL (f);
@@ -8099,6 +8090,13 @@
 #endif
     }
 
+  /* SVG pixmaps specify transparency in the last byte, so right
+     shift 8 bits to get rid of it, since emacs doesn't support
+     transparency.  */
+  background.red   >>= 8;
+  background.green >>= 8;
+  background.blue  >>= 8;
+
   /* This loop handles opacity values, since Emacs assumes
      non-transparent images.  Each pixel must be "flattened" by
      calculating the resulting color, given the transparency of the