@depup/sharp-cli 5.2.0-depup.0 → 6.0.0-depup.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ci.yml +30 -0
- package/.prettierignore +2 -0
- package/.prettierrc +1 -0
- package/CHANGELOG.md +40 -8
- package/README.md +6 -9
- package/bin/cli.js +5 -5
- package/changes.json +5 -17
- package/cmd/channel-manipulation/bandbool.js +24 -19
- package/cmd/channel-manipulation/ensure-alpha.js +27 -22
- package/cmd/channel-manipulation/extract-channel.js +23 -19
- package/cmd/channel-manipulation/join-channel.js +19 -20
- package/cmd/channel-manipulation/remove-alpha.js +12 -15
- package/cmd/colour-manipulation/greyscale.js +16 -16
- package/cmd/colour-manipulation/pipeline-colourspace.js +26 -22
- package/cmd/colour-manipulation/tint.js +17 -19
- package/cmd/colour-manipulation/tocolourspace.js +22 -21
- package/cmd/compositing/composite.js +133 -102
- package/cmd/operations/affine.js +57 -51
- package/cmd/operations/blur.js +44 -41
- package/cmd/operations/boolean.js +22 -21
- package/cmd/operations/clahe.js +37 -37
- package/cmd/operations/convolve.js +52 -48
- package/cmd/operations/dilate.js +58 -0
- package/cmd/operations/erode.js +58 -0
- package/cmd/operations/flatten.js +23 -24
- package/cmd/operations/flip.js +12 -15
- package/cmd/operations/flop.js +12 -15
- package/cmd/operations/gamma.js +26 -25
- package/cmd/operations/linear.js +30 -29
- package/cmd/operations/median.js +18 -22
- package/cmd/operations/modulate.js +42 -31
- package/cmd/operations/negate.js +17 -20
- package/cmd/operations/normalise.js +28 -25
- package/cmd/operations/recomb.js +34 -32
- package/cmd/operations/rotate.js +31 -29
- package/cmd/operations/sharpen.js +49 -45
- package/cmd/operations/threshold.js +29 -29
- package/cmd/operations/unflatten.js +14 -16
- package/cmd/output.js +61 -56
- package/cmd/resizing/extend.js +55 -49
- package/cmd/resizing/extract.js +32 -33
- package/cmd/resizing/resize.js +79 -56
- package/cmd/resizing/trim.js +59 -36
- package/{lib/queue.js → eslint.config.mjs} +21 -17
- package/lib/cli.js +637 -383
- package/lib/constants.js +24 -18
- package/lib/convert.js +106 -73
- package/lib/index.js +56 -23
- package/lib/utils.js +50 -0
- package/package.json +27 -37
package/cmd/operations/linear.js
CHANGED
|
@@ -23,51 +23,52 @@
|
|
|
23
23
|
|
|
24
24
|
// @see https://sharp.pixelplumbing.com/api-operation#linear
|
|
25
25
|
|
|
26
|
-
// Strict mode.
|
|
27
|
-
'use strict'
|
|
28
|
-
|
|
29
|
-
// Local modules.
|
|
30
|
-
const queue = require('../../lib/queue')
|
|
31
|
-
|
|
32
26
|
// Configure.
|
|
33
27
|
const positionals = {
|
|
34
28
|
multiplier: {
|
|
35
|
-
desc:
|
|
29
|
+
desc: "Multiplier",
|
|
36
30
|
default: 1.0,
|
|
37
|
-
type:
|
|
38
|
-
}
|
|
39
|
-
}
|
|
31
|
+
type: "number",
|
|
32
|
+
},
|
|
33
|
+
};
|
|
40
34
|
|
|
41
35
|
const options = {
|
|
42
36
|
offset: {
|
|
43
|
-
desc:
|
|
44
|
-
type:
|
|
45
|
-
}
|
|
46
|
-
}
|
|
37
|
+
desc: "Offset",
|
|
38
|
+
type: "array",
|
|
39
|
+
},
|
|
40
|
+
};
|
|
47
41
|
|
|
48
42
|
// Command builder.
|
|
49
43
|
const builder = (yargs) => {
|
|
50
|
-
const optionNames = Object.keys(options)
|
|
44
|
+
const optionNames = Object.keys(options);
|
|
51
45
|
return yargs
|
|
52
46
|
.strict()
|
|
53
|
-
.example(
|
|
54
|
-
.example(
|
|
55
|
-
.epilog(
|
|
56
|
-
|
|
47
|
+
.example("$0 linear 0.5 --offset 2")
|
|
48
|
+
.example("$0 linear 0.25 0.5 0.75 --offset 150 100 50")
|
|
49
|
+
.epilog(
|
|
50
|
+
"For more information on available options, please visit https://sharp.pixelplumbing.com/api-operation#linear",
|
|
51
|
+
)
|
|
52
|
+
.positional("multiplier", positionals.multiplier)
|
|
57
53
|
.options(options)
|
|
58
|
-
.group(optionNames,
|
|
59
|
-
}
|
|
54
|
+
.group(optionNames, "Command Options");
|
|
55
|
+
};
|
|
60
56
|
|
|
61
57
|
// Command handler.
|
|
62
58
|
const handler = (args) => {
|
|
63
|
-
const multiplier =
|
|
64
|
-
|
|
65
|
-
|
|
59
|
+
const multiplier =
|
|
60
|
+
args.multiplier.length === 1 ? args.multiplier[0] : args.multiplier;
|
|
61
|
+
return args["#queue"].push([
|
|
62
|
+
"linear",
|
|
63
|
+
(sharp) => sharp.linear(multiplier, args.offset),
|
|
64
|
+
]);
|
|
65
|
+
};
|
|
66
66
|
|
|
67
67
|
// Exports.
|
|
68
|
-
|
|
69
|
-
command:
|
|
70
|
-
describe:
|
|
68
|
+
export default {
|
|
69
|
+
command: "linear [multiplier..]",
|
|
70
|
+
describe:
|
|
71
|
+
"Apply the linear formula a × input + b to the image to adjust image levels",
|
|
71
72
|
builder,
|
|
72
|
-
handler
|
|
73
|
-
}
|
|
73
|
+
handler,
|
|
74
|
+
};
|
package/cmd/operations/median.js
CHANGED
|
@@ -23,40 +23,36 @@
|
|
|
23
23
|
|
|
24
24
|
// @see https://sharp.pixelplumbing.com/api-operation#median
|
|
25
25
|
|
|
26
|
-
// Strict mode.
|
|
27
|
-
'use strict'
|
|
28
|
-
|
|
29
|
-
// Local modules.
|
|
30
|
-
const queue = require('../../lib/queue')
|
|
31
|
-
|
|
32
26
|
// Configure.
|
|
33
27
|
const positionals = {
|
|
34
28
|
size: {
|
|
35
|
-
desc:
|
|
29
|
+
desc: "Square mask size",
|
|
36
30
|
defaultDescription: 3,
|
|
37
|
-
type:
|
|
38
|
-
}
|
|
39
|
-
}
|
|
31
|
+
type: "number",
|
|
32
|
+
},
|
|
33
|
+
};
|
|
40
34
|
|
|
41
35
|
// Command builder.
|
|
42
36
|
const builder = (yargs) => {
|
|
43
37
|
return yargs
|
|
44
38
|
.strict()
|
|
45
|
-
.example(
|
|
46
|
-
.example(
|
|
47
|
-
.epilog(
|
|
48
|
-
|
|
49
|
-
|
|
39
|
+
.example("$0 median")
|
|
40
|
+
.example("$0 median 5")
|
|
41
|
+
.epilog(
|
|
42
|
+
"For more information on available options, please visit https://sharp.pixelplumbing.com/api-operation#median",
|
|
43
|
+
)
|
|
44
|
+
.positional("size", positionals.size);
|
|
45
|
+
};
|
|
50
46
|
|
|
51
47
|
// Command handler.
|
|
52
48
|
const handler = (args) => {
|
|
53
|
-
return queue.push([
|
|
54
|
-
}
|
|
49
|
+
return args["#queue"].push(["median", (sharp) => sharp.median(args.size)]);
|
|
50
|
+
};
|
|
55
51
|
|
|
56
52
|
// Exports.
|
|
57
|
-
|
|
58
|
-
command:
|
|
59
|
-
describe:
|
|
53
|
+
export default {
|
|
54
|
+
command: "median [size]",
|
|
55
|
+
describe: "Apply median filter",
|
|
60
56
|
builder,
|
|
61
|
-
handler
|
|
62
|
-
}
|
|
57
|
+
handler,
|
|
58
|
+
};
|
|
@@ -23,56 +23,67 @@
|
|
|
23
23
|
|
|
24
24
|
// @see http://sharp.pixelplumbing.com/api-operation#modulate
|
|
25
25
|
|
|
26
|
-
// Strict mode.
|
|
27
|
-
'use strict'
|
|
28
|
-
|
|
29
|
-
// Package modules.
|
|
30
|
-
const pick = require('lodash.pick')
|
|
31
|
-
|
|
32
26
|
// Local modules.
|
|
33
|
-
|
|
27
|
+
import { pick } from "../../lib/utils.js";
|
|
34
28
|
|
|
35
29
|
// Configure.
|
|
36
30
|
const options = {
|
|
37
31
|
brightness: {
|
|
38
|
-
desc:
|
|
39
|
-
|
|
32
|
+
desc: "Brightness multiplier",
|
|
33
|
+
nargs: 1,
|
|
34
|
+
type: "number",
|
|
40
35
|
},
|
|
41
36
|
hue: {
|
|
42
|
-
desc:
|
|
43
|
-
|
|
37
|
+
desc: "Degrees for hue rotation",
|
|
38
|
+
nargs: 1,
|
|
39
|
+
type: "number",
|
|
44
40
|
},
|
|
45
41
|
lightness: {
|
|
46
|
-
desc:
|
|
47
|
-
|
|
42
|
+
desc: "Lightness addend",
|
|
43
|
+
nargs: 1,
|
|
44
|
+
type: "number",
|
|
48
45
|
},
|
|
49
46
|
saturation: {
|
|
50
|
-
desc:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
47
|
+
desc: "Saturation multiplier",
|
|
48
|
+
nargs: 1,
|
|
49
|
+
type: "number",
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
const optionNames = Object.keys(options);
|
|
55
53
|
|
|
56
54
|
// Command builder.
|
|
57
55
|
const builder = (yargs) => {
|
|
58
56
|
return yargs
|
|
59
57
|
.strict()
|
|
60
|
-
.example(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
.
|
|
58
|
+
.example(
|
|
59
|
+
"$0 modulate --brightness 2",
|
|
60
|
+
"Increase brightness by a factor of 2",
|
|
61
|
+
)
|
|
62
|
+
.example("$0 modulate --hue 180", "Hue-rotate by 180 degrees")
|
|
63
|
+
.example("$0 modulate --lightness 50", "Increase lightness by +50")
|
|
64
|
+
.example(
|
|
65
|
+
"$0 modulate --brightness 0.5 --saturation 0.5 --hue 90",
|
|
66
|
+
"Decrease brightness and saturation while also hue-rotating by 90 degrees",
|
|
67
|
+
)
|
|
68
|
+
.epilog(
|
|
69
|
+
"For more information on available options, please visit http://sharp.pixelplumbing.com/api-operation#modulate",
|
|
70
|
+
)
|
|
65
71
|
.options(options)
|
|
66
|
-
.group(optionNames,
|
|
67
|
-
}
|
|
72
|
+
.group(optionNames, "Command Options");
|
|
73
|
+
};
|
|
68
74
|
|
|
69
75
|
// Command handler.
|
|
70
|
-
const handler = (args) =>
|
|
76
|
+
const handler = (args) =>
|
|
77
|
+
args["#queue"].push([
|
|
78
|
+
"modulate",
|
|
79
|
+
(sharp) => sharp.modulate(pick(args, optionNames)),
|
|
80
|
+
]);
|
|
71
81
|
|
|
72
82
|
// Exports.
|
|
73
|
-
|
|
74
|
-
command:
|
|
75
|
-
describe:
|
|
83
|
+
export default {
|
|
84
|
+
command: "modulate",
|
|
85
|
+
describe:
|
|
86
|
+
"Transforms the image using brightness, saturation, hue rotation, and lightness",
|
|
76
87
|
builder,
|
|
77
|
-
handler
|
|
78
|
-
}
|
|
88
|
+
handler,
|
|
89
|
+
};
|
package/cmd/operations/negate.js
CHANGED
|
@@ -23,38 +23,35 @@
|
|
|
23
23
|
|
|
24
24
|
// @see https://sharp.pixelplumbing.com/api-operation#negate
|
|
25
25
|
|
|
26
|
-
// Strict mode.
|
|
27
|
-
'use strict'
|
|
28
|
-
|
|
29
|
-
// Local modules.
|
|
30
|
-
const queue = require('../../lib/queue')
|
|
31
|
-
|
|
32
26
|
// Configure.
|
|
33
27
|
const options = {
|
|
34
28
|
alpha: {
|
|
35
|
-
desc:
|
|
36
|
-
type:
|
|
37
|
-
}
|
|
38
|
-
}
|
|
29
|
+
desc: "Whether or not to negate any alpha channel",
|
|
30
|
+
type: "boolean",
|
|
31
|
+
},
|
|
32
|
+
};
|
|
39
33
|
|
|
40
34
|
// Command builder.
|
|
41
35
|
const builder = (yargs) => {
|
|
42
|
-
const optionNames = Object.keys(options)
|
|
36
|
+
const optionNames = Object.keys(options);
|
|
43
37
|
return yargs
|
|
44
38
|
.strict()
|
|
45
|
-
.example(
|
|
46
|
-
.epilog(
|
|
39
|
+
.example("$0 negate --no-alpha")
|
|
40
|
+
.epilog(
|
|
41
|
+
"For more information on available options, please visit https://sharp.pixelplumbing.com/api-operation#negate",
|
|
42
|
+
)
|
|
47
43
|
.options(options)
|
|
48
|
-
.group(optionNames,
|
|
49
|
-
}
|
|
44
|
+
.group(optionNames, "Command Options");
|
|
45
|
+
};
|
|
50
46
|
|
|
51
47
|
// Command handler.
|
|
52
|
-
const handler = (args) =>
|
|
48
|
+
const handler = (args) =>
|
|
49
|
+
args["#queue"].push(["negate", (sharp) => sharp.negate(args.alpha)]);
|
|
53
50
|
|
|
54
51
|
// Exports.
|
|
55
|
-
|
|
56
|
-
command:
|
|
52
|
+
export default {
|
|
53
|
+
command: "negate",
|
|
57
54
|
describe: 'Produce the "negative" of the image',
|
|
58
55
|
builder,
|
|
59
|
-
handler
|
|
60
|
-
}
|
|
56
|
+
handler,
|
|
57
|
+
};
|
|
@@ -23,47 +23,50 @@
|
|
|
23
23
|
|
|
24
24
|
// @see https://sharp.pixelplumbing.com/api-operation#normalise
|
|
25
25
|
|
|
26
|
-
// Strict mode.
|
|
27
|
-
'use strict'
|
|
28
|
-
|
|
29
|
-
// Package modules.
|
|
30
|
-
const pick = require('lodash.pick')
|
|
31
|
-
|
|
32
26
|
// Local modules.
|
|
33
|
-
|
|
27
|
+
import { pick } from "../../lib/utils.js";
|
|
34
28
|
|
|
35
29
|
const options = {
|
|
36
30
|
lower: {
|
|
37
31
|
default: 1,
|
|
38
|
-
desc:
|
|
39
|
-
|
|
32
|
+
desc: "Percentile below which luminance values will be underexposed",
|
|
33
|
+
nargs: 1,
|
|
34
|
+
type: "number",
|
|
40
35
|
},
|
|
41
36
|
upper: {
|
|
42
37
|
default: 99,
|
|
43
|
-
desc:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
38
|
+
desc: "Percentile below which luminance values will be overexposed",
|
|
39
|
+
nargs: 1,
|
|
40
|
+
type: "number",
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
const optionNames = Object.keys(options);
|
|
48
44
|
|
|
49
45
|
// Command builder.
|
|
50
46
|
const builder = (yargs) => {
|
|
51
47
|
return yargs
|
|
52
48
|
.strict()
|
|
53
|
-
.epilog(
|
|
54
|
-
|
|
49
|
+
.epilog(
|
|
50
|
+
"For more information on available options, please visit https://sharp.pixelplumbing.com/api-operation#normalise",
|
|
51
|
+
)
|
|
52
|
+
.example("$0 normalise")
|
|
55
53
|
.options(options)
|
|
56
|
-
.group(optionNames,
|
|
57
|
-
}
|
|
54
|
+
.group(optionNames, "Command Options");
|
|
55
|
+
};
|
|
58
56
|
|
|
59
57
|
// Command handler.
|
|
60
|
-
const handler = (args) =>
|
|
58
|
+
const handler = (args) =>
|
|
59
|
+
args["#queue"].push([
|
|
60
|
+
"normalise",
|
|
61
|
+
(sharp) => sharp.normalise(pick(args, optionNames)),
|
|
62
|
+
]);
|
|
61
63
|
|
|
62
64
|
// Exports.
|
|
63
|
-
|
|
64
|
-
command:
|
|
65
|
-
aliases:
|
|
66
|
-
describe:
|
|
65
|
+
export default {
|
|
66
|
+
command: "normalise",
|
|
67
|
+
aliases: "normalize",
|
|
68
|
+
describe:
|
|
69
|
+
"Enhance output image contrast by stretching its luminance to cover the full dynamic range",
|
|
67
70
|
builder,
|
|
68
|
-
handler
|
|
69
|
-
}
|
|
71
|
+
handler,
|
|
72
|
+
};
|
package/cmd/operations/recomb.js
CHANGED
|
@@ -21,54 +21,56 @@
|
|
|
21
21
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
|
-
// @see https://sharp.
|
|
25
|
-
|
|
26
|
-
// Strict mode.
|
|
27
|
-
'use strict'
|
|
28
|
-
|
|
29
|
-
// Local modules.
|
|
30
|
-
const queue = require('../../lib/queue')
|
|
24
|
+
// @see https://sharp.pixelplumbing.com/api-operation#recomb
|
|
31
25
|
|
|
32
26
|
// Configure.
|
|
33
27
|
const placeholders = {
|
|
34
28
|
matrix: {
|
|
35
|
-
desc:
|
|
29
|
+
desc: "Recombination matrix",
|
|
36
30
|
nargs: 3 * 3,
|
|
37
|
-
type:
|
|
38
|
-
}
|
|
39
|
-
}
|
|
31
|
+
type: "number",
|
|
32
|
+
},
|
|
33
|
+
};
|
|
40
34
|
|
|
41
35
|
// Command builder.
|
|
42
36
|
const builder = (yargs) => {
|
|
43
37
|
return yargs
|
|
44
38
|
.strict()
|
|
45
|
-
.example(
|
|
46
|
-
|
|
47
|
-
|
|
39
|
+
.example(
|
|
40
|
+
"$0 recomb 0.3588 0.7044 0.1368 0.2990 0.5870 0.1140 0.2392 0.4696 0.0912",
|
|
41
|
+
"The recomb will be applied to the output, in this case a sepia filter has been applied",
|
|
42
|
+
)
|
|
43
|
+
.epilog(
|
|
44
|
+
"For more information on available options, please visit https://sharp.pixelplumbing.com/api-operation#recomb",
|
|
45
|
+
)
|
|
46
|
+
.check((argv) => {
|
|
48
47
|
if (!(Array.isArray(argv.matrix) && argv.matrix.length === 9)) {
|
|
49
|
-
throw new Error(
|
|
48
|
+
throw new Error("Expected matrix positional to have 9 values");
|
|
50
49
|
}
|
|
51
|
-
return true
|
|
50
|
+
return true;
|
|
52
51
|
})
|
|
53
|
-
.positional(
|
|
54
|
-
}
|
|
52
|
+
.positional("matrix", placeholders.matrix);
|
|
53
|
+
};
|
|
55
54
|
|
|
56
55
|
// Command handler.
|
|
57
56
|
const handler = (args) => {
|
|
58
|
-
const { matrix } = args
|
|
59
|
-
return queue.push([
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
57
|
+
const { matrix } = args;
|
|
58
|
+
return args["#queue"].push([
|
|
59
|
+
"recomb",
|
|
60
|
+
(sharp) => {
|
|
61
|
+
return sharp.recomb([
|
|
62
|
+
matrix.slice(0, 3),
|
|
63
|
+
matrix.slice(3, 6),
|
|
64
|
+
matrix.slice(6, 9),
|
|
65
|
+
]);
|
|
66
|
+
},
|
|
67
|
+
]);
|
|
68
|
+
};
|
|
67
69
|
|
|
68
70
|
// Exports.
|
|
69
|
-
|
|
70
|
-
command:
|
|
71
|
-
describe:
|
|
71
|
+
export default {
|
|
72
|
+
command: "recomb <matrix..>",
|
|
73
|
+
describe: "Recomb the image with the specified matrix",
|
|
72
74
|
builder,
|
|
73
|
-
handler
|
|
74
|
-
}
|
|
75
|
+
handler,
|
|
76
|
+
};
|
package/cmd/operations/rotate.js
CHANGED
|
@@ -23,50 +23,52 @@
|
|
|
23
23
|
|
|
24
24
|
// @see https://sharp.pixelplumbing.com/api-operation#rotate
|
|
25
25
|
|
|
26
|
-
// Strict mode.
|
|
27
|
-
'use strict'
|
|
28
|
-
|
|
29
|
-
// Local modules.
|
|
30
|
-
const queue = require('../../lib/queue')
|
|
31
|
-
|
|
32
26
|
// Configure.
|
|
33
27
|
const positionals = {
|
|
34
28
|
angle: {
|
|
35
|
-
defaultDescription:
|
|
36
|
-
desc:
|
|
37
|
-
type:
|
|
38
|
-
}
|
|
39
|
-
}
|
|
29
|
+
defaultDescription: "auto",
|
|
30
|
+
desc: "Angle of rotation",
|
|
31
|
+
type: "number",
|
|
32
|
+
},
|
|
33
|
+
};
|
|
40
34
|
|
|
41
35
|
const options = {
|
|
42
36
|
background: {
|
|
43
|
-
defaultDescription:
|
|
44
|
-
desc:
|
|
45
|
-
type:
|
|
46
|
-
}
|
|
47
|
-
}
|
|
37
|
+
defaultDescription: "#000000",
|
|
38
|
+
desc: "String parsed by the color module to extract values for red, green, blue and alpha",
|
|
39
|
+
type: "string",
|
|
40
|
+
},
|
|
41
|
+
};
|
|
48
42
|
|
|
49
43
|
// Command builder.
|
|
50
44
|
const builder = (yargs) => {
|
|
51
|
-
const optionNames = Object.keys(options)
|
|
45
|
+
const optionNames = Object.keys(options);
|
|
52
46
|
return yargs
|
|
53
47
|
.strict()
|
|
54
|
-
.example(
|
|
55
|
-
|
|
56
|
-
|
|
48
|
+
.example(
|
|
49
|
+
"$0 rotate",
|
|
50
|
+
"The output will be auto-rotated using EXIF Orientation tag",
|
|
51
|
+
)
|
|
52
|
+
.epilog(
|
|
53
|
+
"For more information on available options, please visit https://sharp.pixelplumbing.com/api-operation#rotate",
|
|
54
|
+
)
|
|
55
|
+
.positional("angle", positionals.angle)
|
|
57
56
|
.options(options)
|
|
58
|
-
.group(optionNames,
|
|
59
|
-
}
|
|
57
|
+
.group(optionNames, "Command Options");
|
|
58
|
+
};
|
|
60
59
|
|
|
61
60
|
// Command handler.
|
|
62
61
|
const handler = (args) => {
|
|
63
|
-
return queue.push([
|
|
64
|
-
|
|
62
|
+
return args["#queue"].push([
|
|
63
|
+
"rotate",
|
|
64
|
+
(sharp) => sharp.rotate(args.angle, { background: args.background }),
|
|
65
|
+
]);
|
|
66
|
+
};
|
|
65
67
|
|
|
66
68
|
// Exports.
|
|
67
|
-
|
|
68
|
-
command:
|
|
69
|
-
describe:
|
|
69
|
+
export default {
|
|
70
|
+
command: "rotate [angle]",
|
|
71
|
+
describe: "Rotate the output image",
|
|
70
72
|
builder,
|
|
71
|
-
handler
|
|
72
|
-
}
|
|
73
|
+
handler,
|
|
74
|
+
};
|