--- Begin Message ---
Subject: |
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
image.c.diff
Description: Binary data
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#6918: Colors of xbm image are swapped on Windows |
Date: |
Sat, 06 Nov 2021 13:35:42 +0200 |
> From: Stefan Kangas <stefan@marxist.se>
> Date: Fri, 5 Nov 2021 06:26:01 -0700
> Cc: Jason Rumney <jasonrumney@gmail.com>, larsi@gnus.org, kzhr@d1.dion.ne.jp,
> 6918@debbugs.gnu.org
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> From: Jason Rumney <jasonrumney@gmail.com>
> >> Date: Thu, 10 Oct 2019 19:59:46 +1300
> >> Cc: Lars Ingebrigtsen <larsi@gnus.org>, kzhr@d1.dion.ne.jp,
> >> 6918@debbugs.gnu.org
> >>
> >> On Fri, 27 Sep 2019 at 17:30, Eli Zaretskii <eliz@gnu.org> wrote:
> >> >
> >> > How do you suggest to test the proposed change, to make sure it
> >> > doesn't break something else? Any pointers to those monochrome PBM
> >> > icons used in the past, for example, or any other files?
> >>
> >> Are the icons not still under etc/images? It looks like they are to me.
> >
> > There are *.pbm icons in etc/images/, and then there are *.ico files
> > in nt/icons/. Which ones did you have in mind?
>
> (That was in 2019, but Jason never replied back.)
>
> My guess is the *.pbm icons - as far as I can tell, Emacs doesn't have
> support for the .ico ones without ImageMagick. The patch is also about
> the pbm code, AFAICT. So I would check them.
I checked them after the change, and they still display correctly. So
I've now installed the change on master, and I'm closing this bug.
Thanks.
--- End Message ---