Skip to content

Commit

Permalink
feat: add flip and flop
Browse files Browse the repository at this point in the history
  • Loading branch information
Chinlinlee committed Aug 26, 2021
1 parent 9185b72 commit fc77d65
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions models/magick/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,20 @@ class Magick {
this.magickCommand.push("-resize");
this.magickCommand.push(`${width}x${height}!`);
}

/**
* reflect the scanlines in the vertical direction. The image will be mirrored upside-down.
*/
flip() {
this.magickCommand.push("-flip");
}

/**
* Reflect the scanlines in the horizontal direction, just like the image in a vertical mirror.
*/
flop() {
this.magickCommand.push("-flop");
}

async execCommand() {
try {
Expand Down

0 comments on commit fc77d65

Please sign in to comment.