playground/js/sharp/negate.js
2022-09-13 15:35:42 +02:00

14 lines
371 B
JavaScript

'use strict';
const sharp = require('sharp');
sharp('in/marmot.jpg').negate().toFile('out/negated-marmot.jpg');
sharp('in/marmot.jpg')
.negate({ alpha: false })
.toFile('out/negated-marmot-no-alpha.jpg');
sharp('in/ducks.jpg').negate().toFile('out/negated-ducks.jpg');
sharp('in/ducks.jpg')
.negate({ alpha: false })
.toFile('out/negated-ducks-no-alpha.jpg');