bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#6918: Colors of xbm image are swapped on Windows


From: Kazuhiro Ito
Subject: bug#6918: Colors of xbm image are swapped on Windows
Date: Thu, 26 Aug 2010 17:42:31 +0900
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/23.2.50 (i386-mingw-nt5.1.2600) MULE/6.0 (HANACHIRUSATO)

When I evaluate below expression with Emacs on Windows, colors of the
second image are swapped.  With Emacs on other environment
(e.g. Debian), second image is identical to first image.


(let ((image "#define default_width 8
#define default_height 16
static char default_bits[] = {
0x81, 0x81, 0x42, 0x42, 0x24, 0x24, 0x18, 0x18, 0x18,
 0x18, 0x24, 0x24, 0x42, 0x42, 0x81, 0x81};")
      (face 'default)
      (string "_"))
  (set-text-properties 0 (length string) `(face ,face) string)
  (with-temp-buffer
    (switch-to-buffer (current-buffer))
    (insert-image
     (create-image image 'xbm t) string)
    (sit-for 1)
    (insert-image
     (create-image image 'xbm t
                   :foreground (face-foreground face)
                   :background (face-background face)
                   ) string)
    (sit-for 3)))


Attached patch would fix problem.  But I don't know this patch is
correct, because this swapping seems intended.

> 2007-06-21  Jason Rumney  <jasonr@gnu.org>
>       * image.c (convert_mono_to_color_image): Swap fore and background.

I guess this swapping has become unnecessary anymore by later change.

> 2007-12-05  Jason Rumney  <jasonr@gnu.org>
>       * image.c (xbm_load) [WINDOWSNT]: Shuffle the bits of directly
>       specified XBMs.

-- 
Kazuhiro Ito

Attachment: image.c.diff
Description: Binary data


reply via email to

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