@thi.ng/imago
Version:
JSON & API-based declarative and extensible image processing trees/pipelines
45 lines (44 loc) • 1 kB
JavaScript
const defSpec = (op) => (opts) => ({ op, ...opts });
const defLayerSpec = (type) => (opts) => ({ type, ...opts });
const blur = defSpec("blur");
const composite = defSpec("composite");
const colorLayer = defLayerSpec("color");
const imageLayer = defLayerSpec("img");
const rawLayer = defLayerSpec("raw");
const svgLayer = defLayerSpec("svg");
const textLayer = defLayerSpec("text");
const crop = defSpec("crop");
const dither = defSpec("dither");
const exif = defSpec("exif");
const extend = defSpec("extend");
const gamma = defSpec("gamma");
const grayscale = defSpec("gray");
const hsbl = defSpec("hsbl");
const icc = defSpec("icc");
const nest = defSpec("nest");
const output = defSpec("output");
const resize = defSpec("resize");
const rotate = defSpec("rotate");
export {
blur,
colorLayer,
composite,
crop,
defLayerSpec,
defSpec,
dither,
exif,
extend,
gamma,
grayscale,
hsbl,
icc,
imageLayer,
nest,
output,
rawLayer,
resize,
rotate,
svgLayer,
textLayer
};