Blur an image

Face with waiting expression Nothing to see yet!

Loading takeymakey...
TakeyMakey code
Want this tool to do something else? Edit the code below and make it do whatever you want.
({
  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" }]
  },
})