record-desktop
Version:
Record gifs and take screenshots on linux, built with electron.
15 lines (11 loc) • 621 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = xwd;
var _utils = require('../utils');
// kudos to Glutanimate, taken from https://github.com/ewnd9/dotfiles/blob/72218bd63c0d44b0e74c1a346625cbdc1f44bb40/dropshadow.sh
var shadow = '\\( +clone -background black -shadow 80x20+0+15 \\) +swap -background transparent -layers merge +repage';
function xwd(width, height, x, y, outputFile, effect) {
return (0, _utils.exec)('xwd -silent -root | convert - -crop ' + width + 'x' + height + '+' + x + '+' + y + ' ' + (effect === 'shadow' ? shadow : '') + ' ' + outputFile);
};