-
Notifications
You must be signed in to change notification settings - Fork 25
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
Alter an existing ICC profile #28
Comments
As a very naive approach, I've compared the output of Default (Gnome's "automatic")
Calibrated
Basing on this, I've tried to recreate the same values in The result isn't perfect, but it seems close enough to me for such a hackish patch: diff --git a/icc-brightness-gen.c b/icc-brightness-gen.c
index 1baad9d..fec17c6 100644
--- a/icc-brightness-gen.c
+++ b/icc-brightness-gen.c
@@ -21,11 +21,13 @@ cmsHPROFILE create_srgb_profile(double brightness)
cmsMLUfree(mlu);
cmsContext context_id = cmsCreateContext(NULL, NULL);
- double curve[] = {1.0, brightness, 0.0}; // gamma, a, b for (a X +b)^gamma
+ double curve1[] = {1.0, brightness, 0.0}; // gamma, a, b for (a X +b)^gamma
+ double curve2[] = {1.05, brightness, 0.0};
+ double curve3[] = {0.995, brightness, 0.0};
cmsToneCurve *tone_curve[3] = {
- cmsBuildParametricToneCurve(context_id, 2, curve),
- cmsBuildParametricToneCurve(context_id, 2, curve),
- cmsBuildParametricToneCurve(context_id, 2, curve),
+ cmsBuildParametricToneCurve(context_id, 2, curve1),
+ cmsBuildParametricToneCurve(context_id, 2, curve2),
+ cmsBuildParametricToneCurve(context_id, 2, curve3),
};
cmsWriteTag(hsRGB, cmsSigVcgtTag, tone_curve);
cmsFreeToneCurve(tone_curve[0]); The next step could be figuring out these values automatically and writing them to a config file of sorts by adding an additional action to the main Python script, so that a single command can be run to "calibrate" icc-brightness on the currently loaded color profile; something like |
It's possible to source calibrated ICC profiles for many laptop screens, but using them on OLED panels would force the maximum brightness. Being able to dynamically generate brightness-adjusted values from such profiles would be really interesting, or maybe even pre-generating a set of per-level profiles to be used later.
For reference, notebookcheck provides a calibrated profile for my HP Spectre 13-aw0xxx.
The text was updated successfully, but these errors were encountered: