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: Eli Zaretskii
Subject: bug#6918: Colors of xbm image are swapped on Windows
Date: Thu, 26 Sep 2019 21:31:19 +0300

> 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 via email to

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