unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>,
	jasonr@gnu.org, jasonrumney@gmail.com
Cc: kzhr@d1.dion.ne.jp, 6918@debbugs.gnu.org
Subject: bug#6918: Colors of xbm image are swapped on Windows
Date: Thu, 26 Sep 2019 21:31:19 +0300	[thread overview]
Message-ID: <83d0fmlxjc.fsf@gnu.org> (raw)
In-Reply-To: <877e5vkkfj.fsf@gnus.org> (message from Lars Ingebrigtsen on Thu,  26 Sep 2019 19:59:44 +0200)

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Thu, 26 Sep 2019 19:59:44 +0200
> Cc: 6918@debbugs.gnu.org
> 
> Kazuhiro Ito <kzhr@d1.dion.ne.jp> writes:
> 
> > 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.
> 
> [...]
> 
> > 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.
> 
> The code in question seems odd, indeed:
> 
>   /* Windows convention for mono bitmaps is black = background,
>      white = foreground.  */
>   SetTextColor (new_img_dc, background);
>   SetBkColor (new_img_dc, foreground);
> 
> Can anybody who works on Windows say whether this is the case?

Say whether WHAT is the case?

I can confirm that the second image has its colors inverted.  But we
have no experts on image display on Windows on board; Jason was the
last one we had, so his word will remain the last one until we have
someone to replace his expertise.  I'm adding Jason to the addresses
in the hope that he will respond.  Failing that, I'm sorry, but I'm
not going to agree to a change like that due to some obscure use case,
which succeeded to lay low for the last 9 years without popping
anywhere else.





  reply	other threads:[~2019-09-26 18:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-26  8:42 bug#6918: Colors of xbm image are swapped on Windows Kazuhiro Ito
2019-09-26 17:59 ` Lars Ingebrigtsen
2019-09-26 18:31   ` Eli Zaretskii [this message]
2019-09-26 18:34     ` Lars Ingebrigtsen
2019-09-26 18:44       ` Eli Zaretskii
2019-09-26 21:38         ` Jason Rumney
2019-09-27  5:30           ` Eli Zaretskii
2019-10-10  6:59             ` Jason Rumney
2019-10-10  8:17               ` Eli Zaretskii
2021-11-05 13:26                 ` Stefan Kangas
2021-11-06 11:35                   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83d0fmlxjc.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=6918@debbugs.gnu.org \
    --cc=jasonr@gnu.org \
    --cc=jasonrumney@gmail.com \
    --cc=kzhr@d1.dion.ne.jp \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).