({
take: [
{ type: "image" },
{ type: "number", label: "Blur radius", value: 3, min: 0, max: 150 },
{ type: "number", label: "Iterations", value: 1, min: 1, max: 10 },
{
type: "import",
value:
"https://cdn.jsdelivr.net/npm/stackblur-canvas@2.5.0/dist/stackblur.min.js",
},
],
make: ([image, blur, iterations]) => {
if (!image.canvas) return
while (iterations--) {
StackBlur.canvasRGBA(image.canvas, 0, 0, image.width, image.height, blur)
}
return [{ type: "image", value: image.canvas, format: "jpeg" }]
},
})