Fix SVG colors (bug#56182)
* src/image.c (svg_load_image): Reverse the R and B bytes in the Windows colors before using them to generate the SVG.
This commit is contained in:
parent
9396d73942
commit
6cc6455e93
1 changed files with 12 additions and 0 deletions
12
src/image.c
12
src/image.c
|
@ -11423,6 +11423,18 @@ svg_load_image (struct frame *f, struct image *img, char *contents,
|
|||
img->background_valid = 1;
|
||||
}
|
||||
|
||||
#if HAVE_NTGUI
|
||||
/* Windows stores the image colours in BGR format, and SVG expects
|
||||
them in RGB. */
|
||||
foreground = (foreground & 0x0000FF) << 16
|
||||
| (foreground & 0xFF0000) >> 16
|
||||
| (foreground & 0x00FF00);
|
||||
|
||||
background = (background & 0x0000FF) << 16
|
||||
| (background & 0xFF0000) >> 16
|
||||
| (background & 0x00FF00);
|
||||
#endif
|
||||
|
||||
wrapped_contents = xmalloc (buffer_size);
|
||||
|
||||
if (buffer_size <= snprintf (wrapped_contents, buffer_size, wrapper,
|
||||
|
|
Loading…
Add table
Reference in a new issue