Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8f4e7dd

Browse files
authored
Merge pull request #22639 from remia/macosx-srgb-colorspace
ENH: MacOSX backend to use sRGB instead of GenericRGB colorspace
2 parents b9ae51c + a28e92c commit 8f4e7dd

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
MacOSX backend to use sRGB instead of GenericRGB colorspace
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
MacOSX backend now display sRGB tagged image instead of GenericRGB which is
4+
an older (now deprecated) Apple colorspace. This is the source colorspace
5+
used by ColorSync to convert to the current display profile.

src/_macosx.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1205,7 +1205,7 @@ static int _copy_agg_buffer(CGContextRef cr, PyObject *renderer)
12051205
const size_t bitsPerPixel = bitsPerComponent * nComponents;
12061206
const size_t bytesPerRow = nComponents * bytesPerComponent * ncols;
12071207

1208-
CGColorSpaceRef colorspace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);
1208+
CGColorSpaceRef colorspace = CGColorSpaceCreateWithName(kCGColorSpaceSRGB);
12091209
if (!colorspace) {
12101210
_buffer_release(buffer, NULL, 0);
12111211
return 1;

0 commit comments

Comments
 (0)