]> git.eshelyaron.com Git - emacs.git/commitdiff
(svg_load_image): Fix last change.
authorChong Yidong <cyd@stupidchicken.com>
Fri, 6 Feb 2009 17:19:10 +0000 (17:19 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Fri, 6 Feb 2009 17:19:10 +0000 (17:19 +0000)
src/image.c

index a02f86a9c90c9c2d2de23febfcec90d648f24192..3323a68d33f16b5337374617f4d311db5a8966b7 100644 (file)
@@ -8079,17 +8079,8 @@ svg_load_image (f, img, contents, size)
   /* 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 @@ svg_load_image (f, img, contents, size)
 #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