@progress/kendo-e2e
Version:
Kendo UI end-to-end test utilities.
11 lines • 439 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.crop = crop;
const pngjs_1 = require("pngjs");
function crop(image, rect) {
const dst = new pngjs_1.PNG({ width: rect.width, height: rect.height });
const src = pngjs_1.PNG.sync.read(image);
pngjs_1.PNG.bitblt(src, dst, rect.x, rect.y, rect.width, rect.height, 0, 0);
return pngjs_1.PNG.sync.write(dst);
}
//# sourceMappingURL=crop.js.map
;