]> git.eshelyaron.com Git - emacs.git/commitdiff
Use correct colorspace for XBM images
authorAlan Third <alan@idiocy.org>
Sun, 14 Jul 2019 16:24:56 +0000 (17:24 +0100)
committerAlan Third <alan@idiocy.org>
Sun, 14 Jul 2019 16:41:19 +0000 (17:41 +0100)
* src/nsimage.m ([EmacsImage setXBMColor:]): Use 'generic RGB' color
space.

src/nsimage.m

index 6f0340302ca0754fa7f50351a62c7ad0e3ade2f6..e1408c77f5887ad70fbd5aaa5ca740561a12ba16 100644 (file)
@@ -309,8 +309,8 @@ ns_set_alpha (void *img, int x, int y, unsigned char a)
   if (bmRep == nil || color == nil)
     return self;
 
-  if ([color colorSpace] != [NSColorSpace deviceRGBColorSpace])
-    rgbColor = [color colorUsingColorSpace:[NSColorSpace deviceRGBColorSpace]];
+  if ([color colorSpace] != [NSColorSpace genericRGBColorSpace])
+    rgbColor = [color colorUsingColorSpace:[NSColorSpace genericRGBColorSpace]];
   else
     rgbColor = color;