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

Fix iridas cube parser to accept and convert double precision. #2056

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Shootfast
Copy link
Contributor

The old Iridas cube parser would silently convert double precision values to floats and continue working, wheras the current code will raise an "Invalid color triplets" error.

This patch restores the older behaviour.

The old Iridas cube parser would silently convert double precision values to floats and continue working, wheras the current code will raise an "Invalid color triplets" error.

This patch restores the older behaviour.

Signed-off-by: Shootfast <[email protected]>
Copy link

linux-foundation-easycla bot commented Sep 23, 2024

CLA Signed


The committers listed above are authorized under a signed CLA.

// Use doubles here as some iridas cube files may be written with double precision
// string values, and these will raise result_out_of_range errors in NumberUtils::from_chars
// instead of silently converting to float like they used to
double r = NAN;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It probably needs an explicit cast to double to make the Windows checks happy?

@Shootfast
Copy link
Contributor Author

Actually I've just noticed this problem extends to other lut file formats as well - at least spi1d/spi3d

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

Successfully merging this pull request may close these issues.

2 participants