Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS has over-saturated colors when system colorspace isn't sRGB #3645

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 5 comments
Closed

macOS has over-saturated colors when system colorspace isn't sRGB #3645

SDLBugzilla opened this issue Feb 11, 2021 · 5 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

Reported in version: HG 2.1
Reported for operating system, platform: Mac OS X (All), All

Comments on the original bug report:

On 2020-04-15 20:35:04 +0000, wrote:

On macOS, the display rendered is over-saturated.

You can see this by e.g. opening a PNG in Preview.app, and then displaying the same image in SDL (using a loader like libpng, libspng, lodepng, stb_image, etc that bypasses the system color management).

There was a previous commit to fix this https://hg.libsdl.org/SDL/rev/e5b39f4935c8 that set the window colorspace to sRGB, but apparently caused performance issues https://hg.libsdl.org/SDL/rev/3a847ed9f8b1https://hg.libsdl.org/SDL/rev/3a847ed9f8b1 . I couldn't find any other references to this issue, though note that OpenTTD was able to improve performance by setting the colorspace OpenTTD/OpenTTD#7644

If setting the colorspace causes performance issues, then we should figure out another way to do it such that colors are rendered correctly.

@dortamiguel
Copy link

Could be possible to fix this? Now on mac using OpenGL textures don't match the color profile of the monitor

@slime73
Copy link
Contributor

slime73 commented Aug 3, 2021

If we can't make this work purely inside SDL without performance regressions then IMO something should be exposed via an API to either let users choose what to do or to give them the tools to do color conversions on their own. I can't say I've looked at this much lately so I don't know what's the best solution though.

@dortamiguel
Copy link

that will be nice, while that get updated, there is any way of telling macos to color correct the window?

@slouken slouken removed the bug label May 11, 2022
@slime73
Copy link
Contributor

slime73 commented Nov 24, 2022

I think this is fixed with d230051

@icculus
Copy link
Collaborator

icculus commented May 25, 2023

Sasha is correct; I believe this was the fix, and I can see it on my own monitor.

@icculus icculus closed this as completed May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants