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

Is there a way to query the parametric constants for a tone curve? #218

Closed
DominikDeak opened this issue Jun 5, 2020 · 3 comments
Closed
Assignees

Comments

@DominikDeak
Copy link

We can query the tone curve type using the cmsGetToneCurveParametricType function. Is there an equivalent way to access the parametric constants for a cmsToneCurve struct? If not, how practical is implementing such a feature in the API?

@mm2
Copy link
Owner

mm2 commented Jun 5, 2020

Actually there is no function to do that, but I think it would be quite easy, something like:

cmsFloat64Number* cmsGetToneCurveParams(const cmsToneCurve* t)
{
_cmsAssert(t != NULL);

if (t -> nSegments != 1) return NULL;
return t ->Segments[0].Params;

}

I will add this to the development sources, thanks for the idea!

@mm2 mm2 self-assigned this Jun 15, 2020
@mm2
Copy link
Owner

mm2 commented Jun 15, 2020

Included in 2.11

@mm2 mm2 closed this as completed Jun 15, 2020
@DominikDeak
Copy link
Author

Thank you!

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

2 participants