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

Use Quantum.Convert for K value in MagickColor #1512

Merged
merged 1 commit into from
Feb 15, 2024

Conversation

Gounlaf
Copy link
Contributor

@Gounlaf Gounlaf commented Jan 6, 2024

Use Quantum.Convert for K value same as red, green, blue.

I don't find a "good reason" that would explain a simple casting without check. But I'm may be wrong;

Regards.

Use Quantum.Convert for K value same as red, green, blue
@dlemstra
Copy link
Owner

dlemstra commented Jan 6, 2024

Your patch looks like a correct fix. Might also be good to add some unit tests for this.

@Gounlaf
Copy link
Contributor Author

Gounlaf commented Jan 6, 2024

Might also be good to add some unit tests for this.

May I leave you this burden? I don't even know what should be tested here... 😅

@dlemstra
Copy link
Owner

dlemstra commented Jan 7, 2024

I don't mind doing this but the test should be something like MagickColors.SomeColor * 0.X and then check the result.

Copy link
Owner

@dlemstra dlemstra left a comment

Choose a reason for hiding this comment

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

Forgot about this PR. Will merge it and add a unit test myself.

@dlemstra dlemstra merged commit 6e76c42 into dlemstra:main Feb 15, 2024
25 checks passed
dlemstra added a commit that referenced this pull request Feb 15, 2024
@Gounlaf Gounlaf deleted the patch-2 branch February 16, 2024 10:05
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