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

Add autoGamma, autoLevel and gaussianBlur to MagickImage. #150

Merged
merged 3 commits into from
Feb 8, 2024

Conversation

Peeterush
Copy link
Contributor

@Peeterush Peeterush commented Feb 5, 2024

gaussianBlur(radius: number, channels: Channels): void; was omitted as there is no way to distinguish it from gaussianBlur(radius: number, sigma: number): void;

@dlemstra
Copy link
Owner

dlemstra commented Feb 5, 2024

Can you rebase this PR so we can run the tests? And thanks for splitting the PR up so those new methods are added individually. Otherwise I would have asked to split this PR up.

@dlemstra
Copy link
Owner

dlemstra commented Feb 5, 2024

And you also got some linting issues. Please update the individual commits or create separate PR's.

@Peeterush
Copy link
Contributor Author

Oops! I accidentally had ESLint disabled in my IDE. All good now!

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.

Thanks for your help, left some review comments.

* Gaussian blur image.
* @param radius - The number of neighbor pixels to be included in the convolution.
*/
gaussianBlur(radius: number): void;
Copy link
Owner

Choose a reason for hiding this comment

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

The Magick.NET library also has a (radius: number, channels: Channels) overload. Can this also be added?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the issue I described in #151. But we can't use the same trick here, as it collides with (radius: number, sigma: number). If you can think of another way I'll happily implement it.

Copy link
Owner

@dlemstra dlemstra Feb 8, 2024

Choose a reason for hiding this comment

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

For an other method I made the channels argument the first argument but that is also not a really clean solution that I should probably revert. And that will also not work here.

tests/magick-image/gaussian-blur.spec.ts Outdated Show resolved Hide resolved
@Peeterush Peeterush force-pushed the add-features branch 2 times, most recently from b97f65c to 50aa8b2 Compare February 7, 2024 12:40
@dlemstra dlemstra merged commit 9b4fc7e into dlemstra:main Feb 8, 2024
7 checks passed
@Peeterush Peeterush deleted the add-features branch February 9, 2024 19:35
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.

None yet

2 participants