emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/src image.c


From: Chong Yidong
Subject: [Emacs-diffs] emacs/src image.c
Date: Fri, 06 Feb 2009 17:19:11 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      09/02/06 17:19:10

Modified files:
        src            : image.c 

Log message:
        (svg_load_image): Fix last change.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/image.c?cvsroot=emacs&r1=1.119&r2=1.120

Patches:
Index: image.c
===================================================================
RCS file: /sources/emacs/emacs/src/image.c,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -b -r1.119 -r1.120
--- image.c     29 Jan 2009 10:36:49 -0000      1.119
+++ image.c     6 Feb 2009 17:19:10 -0000       1.120
@@ -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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]