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

Added solarize to MagickImage #100

Merged
merged 6 commits into from
Jun 26, 2023
Merged

Added solarize to MagickImage #100

merged 6 commits into from
Jun 26, 2023

Conversation

cordeiro-rubens
Copy link
Contributor

No description provided.

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 adding this. Left some tiny comments.

@@ -247,6 +247,8 @@ export interface IMagickImage extends IDisposable {
sigmoidalContrast(contrast: number, midpoint: number): void;
sigmoidalContrast(contrast: number, midpoint: number, channels: Channels): void;
splice(geometry: MagickGeometry): void;
solarize(): void;
solarize(factor: Percentage | number): void;
Copy link
Owner

@dlemstra dlemstra Jun 26, 2023

Choose a reason for hiding this comment

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

In the interface I don't use | but write both overloads instead.

solarize(factor: number): void;
solarize(factor: Percentage): void;

@@ -1328,6 +1330,14 @@ export class MagickImage extends NativeInstance implements IMagickImage {
this._sigmoidalContrast(true, contrast, midpointOrPercentage, channelsOrUndefined)
}

solarize(): void
solarize(factorOrNumber: Percentage | number = new Percentage(50)): void {
Copy link
Owner

Choose a reason for hiding this comment

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

Can you change factorOrNumber to numberOrPercentage? And I like the use of = new Percentage(50). Think I should have used that in some other spots also.

@dlemstra dlemstra merged commit a249a3a into dlemstra:main Jun 26, 2023
10 checks passed
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