BoboTiG / python-mss

An ultra fast cross-platform multiple screenshots module in pure Python using ctypes.
https://pypi.org/project/mss/
MIT License
1.01k stars 93 forks source link

Display Profile Color Correction #207

Open Snipeye opened 3 years ago

Snipeye commented 3 years ago

General information:

Description of the warning/error

When a capture (using .grab) in macOS, the resultant screenshot is modified according to the selected color profile. A picture of a pure #FF00FF color resulted in RGB values of [252 40 252] - this agrees with the system color profile tool:

image

A workaround is to set my profile to sRGB IEC61966-2.1, but even that results in some "corruption" ([251 0 255]). Is there a way we can reverse the color-correction? I think that CGImage has a link to the decode transform used to change color spaces? (https://developer.apple.com/documentation/coregraphics/cgimage/1454575-decode) but I'm not sure if that's what's being used under the hood for mss, I only stumbled on this today when looking for some fast image capture.

Full message

None

Other details

None

Upvote & Fund

Fund with Polar