-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
Conversation
There was a problem hiding this 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.
src/magick-image.ts
Outdated
@@ -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; |
There was a problem hiding this comment.
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;
src/magick-image.ts
Outdated
@@ -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 { |
There was a problem hiding this comment.
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.
…solarize method in MagickImage
No description provided.