@thi.ng/imago
Version:
JSON & API-based declarative and extensible image processing trees/pipelines
14 lines (13 loc) • 326 B
JavaScript
import { coerceColor } from "../utils.js";
const rotateProc = async (spec, input, _) => {
const { angle, bg, flipX, flipY } = spec;
if (flipX) input = input.flop();
if (flipY) input = input.flip();
return [
input.rotate(angle, { background: coerceColor(bg || "#0000") }),
true
];
};
export {
rotateProc
};