Skip to content

Use Quantum.Convert for K value in MagickColor#1512

Merged
dlemstra merged 1 commit into
dlemstra:mainfrom
Gounlaf:patch-2
Feb 15, 2024
Merged

Use Quantum.Convert for K value in MagickColor#1512
dlemstra merged 1 commit into
dlemstra:mainfrom
Gounlaf:patch-2

Conversation

@Gounlaf

@Gounlaf Gounlaf commented Jan 6, 2024

Copy link
Copy Markdown
Contributor

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

dlemstra commented Jan 6, 2024

Copy link
Copy Markdown
Owner

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

@Gounlaf

Gounlaf commented Jan 6, 2024

Copy link
Copy Markdown
Contributor Author

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

dlemstra commented Jan 7, 2024

Copy link
Copy Markdown
Owner

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

@dlemstra dlemstra left a comment

Copy link
Copy Markdown
Owner

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
dlemstra added a commit that referenced this pull request Feb 15, 2024
@Gounlaf Gounlaf deleted the patch-2 branch February 16, 2024 10:05
This was referenced Jul 23, 2025
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