GNU logs - #6918, boring messages


Message sent to owner <at> debbugs.gnu.org, 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> debbugs.gnu.org
Resent-To: owner <at> debbugs.gnu.org
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 26 Aug 2010 08:47:01 +0000
Resent-Message-ID: <handler.6918.B.128281237129913 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 6918
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 6918 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.128281237129913
          (code B ref -1); Thu, 26 Aug 2010 08:47:01 +0000
Received: (at submit) by debbugs.gnu.org; 26 Aug 2010 08:46:11 +0000
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OoY67-0007mQ-19
	for submit <at> debbugs.gnu.org; Thu, 26 Aug 2010 04:46:11 -0400
Received: from mx10.gnu.org ([199.232.76.166])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <kzhr@HIDDEN>) id 1OoY1U-0007jc-Cw
	for submit <at> debbugs.gnu.org; Thu, 26 Aug 2010 04:41:25 -0400
Received: from lists.gnu.org ([199.232.76.165]:45445)
	by monty-python.gnu.org 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> debbugs.gnu.org; Thu, 26 Aug 2010 04:42:49 -0400
Received: from [140.186.70.92] (port=46004 helo=eggs.gnu.org)
	by lists.gnu.org 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 eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00
	autolearn=unavailable version=3.3.1
Received: from Debian-exim by eggs.gnu.org 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 msa105.auone-net.jp ([61.117.18.165]:39407)
	by eggs.gnu.org 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 MJOLNIR.tigers-net.com (dhcp-sch-f7-211-148.med.osaka-cu.ac.jp
	[160.193.211.148])
	by msa105.auone-net.jp (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 eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older,
	4)
X-detected-operating-system: by monty-python.gnu.org: 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> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -5.1 (-----)

--Multipart_Thu_Aug_26_17:42:31_2010-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)
  (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@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

--Multipart_Thu_Aug_26_17:42:31_2010-1
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);


--Multipart_Thu_Aug_26_17:42:31_2010-1--




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
 Windows)
Message-ID: <handler.6918.B.128281237129913.ack <at> debbugs.gnu.org>
References: <82tymhzrwo.wl%kzhr@HIDDEN>
X-Gnu-PR-Message: ack 6918
X-Gnu-PR-Package: emacs
Reply-To: 6918 <at> debbugs.gnu.org
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):
 bug-gnu-emacs@HIDDEN

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

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

--=20
6918: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D6918
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.