GNU logs - #6918, boring messages

Message sent to owner <at>, bug-gnu-emacs@HIDDEN:

X-Loop: help-debbugs@HIDDEN
Subject: bug#6918: Colors of xbm image are swapped on Windows
Resent-From: Kazuhiro Ito <kzhr@HIDDEN>
Original-Sender: debbugs-submit-bounces <at>
Resent-To: owner <at>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 26 Aug 2010 08:47:01 +0000
Resent-Message-ID: <handler.6918.B.128281237129913 <at>>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 6918
X-GNU-PR-Package: emacs
To: 6918 <at>
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> id=B.128281237129913
          (code B ref -1); Thu, 26 Aug 2010 08:47:01 +0000
Received: (at submit) by; 26 Aug 2010 08:46:11 +0000
Received: from localhost ([]
	by with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at>>)
	id 1OoY67-0007mQ-19
	for submit <at>; Thu, 26 Aug 2010 04:46:11 -0400
Received: from ([])
	by with esmtp (Exim 4.69)
	(envelope-from <kzhr@HIDDEN>) id 1OoY1U-0007jc-Cw
	for submit <at>; Thu, 26 Aug 2010 04:41:25 -0400
Received: from ([]:45445)
	by with esmtps
	(TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60)
	(envelope-from <kzhr@HIDDEN>) id 1OoY2r-0000xs-6k
	for submit <at>; Thu, 26 Aug 2010 04:42:49 -0400
Received: from [] (port=46004
	by with esmtp (Exim 4.43) id 1OoY2p-00015t-Oe
	for bug-gnu-emacs@HIDDEN; Thu, 26 Aug 2010 04:42:48 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00
	autolearn=unavailable version=3.3.1
Received: from Debian-exim by with spam-scanned (Exim 4.69)
	(envelope-from <kzhr@HIDDEN>) id 1OoY2o-0006K1-Mh
	for bug-gnu-emacs@HIDDEN; Thu, 26 Aug 2010 04:42:47 -0400
Received: from ([]:39407)
	by with esmtp (Exim 4.69)
	(envelope-from <kzhr@HIDDEN>) id 1OoY2o-0006Il-7O
	for bug-gnu-emacs@HIDDEN; Thu, 26 Aug 2010 04:42:46 -0400
Received: from (
	by (au one net msa) with ESMTP id 32E962C803A;
	Thu, 26 Aug 2010 17:42:32 +0900 (JST)
Date: Thu, 26 Aug 2010 17:42:31 +0900
Message-ID: <82tymhzrwo.wl%kzhr@HIDDEN>
From: Kazuhiro Ito <kzhr@HIDDEN>
User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka)
	FLIM/1.14.9 =?UTF-8?Q?(Goj=C5=8D)?= APEL/10.8 Emacs/23.2.50
	(i386-mingw-nt5.1.2600) MULE/6.0 (HANACHIRUSATO)
MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka")
Content-Type: multipart/mixed; boundary="Multipart_Thu_Aug_26_17:42:31_2010-1"
X-detected-operating-system: by GNU/Linux 2.6, seldom 2.4 (older,
X-detected-operating-system: by GNU/Linux 2.6,
	seldom 2.4 (older, 4)
X-Spam-Score: -4.1 (----)
X-Mailman-Approved-At: Thu, 26 Aug 2010 04:46:09 -0400
X-BeenThere: debbugs-submit <at>
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <>
List-Unsubscribe: <>,
	<mailto:debbugs-submit-request <at>>
List-Archive: <>
List-Post: <mailto:debbugs-submit <at>>
List-Help: <mailto:debbugs-submit-request <at>>
List-Subscribe: <>,
	<mailto:debbugs-submit-request <at>>
Sender: debbugs-submit-bounces <at>
Errors-To: debbugs-submit-bounces <at>
X-Spam-Score: -5.1 (-----)

Content-Type: text/plain; charset=US-ASCII

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)
    (switch-to-buffer (current-buffer))
     (create-image image 'xbm t) string)
    (sit-for 1)
     (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@HIDDEN>
> 	* 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@HIDDEN>
> 	* image.c (xbm_load) [WINDOWSNT]: Shuffle the bits of directly
> 	specified XBMs.

Kazuhiro Ito

Content-Type: application/octet-stream; type=patch
Content-Disposition: attachment; filename="image.c.diff"
Content-Transfer-Encoding: 7bit

=== modified file 'src/image.c'
--- src/image.c	2010-06-19 19:43:47 +0000
+++ src/image.c	2010-08-26 07:35:54 +0000
@@ -2643,8 +2643,8 @@
   new_prev = SelectObject (new_img_dc, new_pixmap);
   /* Windows convention for mono bitmaps is black = background,
      white = foreground.  */
-  SetTextColor (new_img_dc, background);
-  SetBkColor (new_img_dc, foreground);
+  SetTextColor (new_img_dc, foreground);
+  SetBkColor (new_img_dc, background);
   BitBlt (new_img_dc, 0, 0, img->width, img->height, old_img_dc,
 	  0, 0, SRCCOPY);


Message sent:

Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Kazuhiro Ito <kzhr@HIDDEN>
Subject: bug#6918: Acknowledgement (Colors of xbm image are swapped on
Message-ID: <handler.6918.B.128281237129913.ack <at>>
References: <82tymhzrwo.wl%kzhr@HIDDEN>
X-Gnu-PR-Message: ack 6918
X-Gnu-PR-Package: emacs
Reply-To: 6918 <at>
Date: Thu, 26 Aug 2010 08:47:01 +0000

Thank you for filing a new bug report with GNU.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):

If you wish to submit further information on this problem, please
send it to 6918 <at>

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems

Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.