flozz/StackBlur
flozz/StackBlur has 1,311 GitHub stars and 119 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-08 07:23 UTC. Last push 2026-09-17.
Fast and almost Gaussian blur
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalStackBlur.js
StackBlur.js is a fast, almost Gaussian blur created by Mario Klingemann.
- More informations: http://incubator.quasimondo.com/processing/fast_blur_deluxe.php
- Algorithm: https://medium.com/better-programming/blurring-image-algorithm-example-in-android-cec81911cd5e
- Demo: http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html
Original source:
Getting Started
Standalone version
To use the standalone version,
download the latest zip from Github or clone the repository
git clone [email protected]:flozz/StackBlur.git
and include the dist/stackblur.js or dist/stackblur.min.js file in your HTML page:
<script src="StackBlur/dist/stackblur.js"></script>
Node
To use the NPM package,
install the package:
npm install --save stackblur-canvas
and require it where needed
const StackBlur = require('stackblur-canvas');
Browsers
If you are only supporting modern browsers, you may use ES6 Modules directly:
import * as StackBlur from
'./node_modules/stackblur-canvas/dist/stackblur-es.min.js';
Or, if you are using Rollup in your own project, use the node-resolve plugin, and import by just referencing the module:
import * as StackBlur from 'stackblur-canvas';
API
See also the docs in docs/jsdoc.
Image as source:
StackBlur.image(sourceImage, targetCanvas, radius, blurAlphaChannel);
sourceImage: theHTMLImageElementor itsid.targetCanvas: theHTMLCanvasElementor itsid.radius: the radius of the blur.blurAlphaChannel: Set it totrueif you want to blur a RGBA image (optional, default =false)
RGBA Canvas as source:
StackBlur.canvasRGBA(targetCanvas, topX, topY, width, height, radius);
targetCanvas: theHTMLCanvasElement.topX: the horizontal coordinate of the top-left corner of the rectangle to blur.topY: the vertical coordinate of the top-left corner of the rectangle to blur.width: the width of the rectangle to blur.height: the height of the rectangle to blur.radius: the radius of the blur.
RGB Canvas as source:
StackBlur.canvasRGB(targetCanvas, topX, topY, width, height, radius);
targetCanvas: theHTMLCanvasElement.topX: the horizontal coordinate of the top-left corner of the rectangle to blur.topY: the vertical coordinate of the top-left corner of the rectangle to blur.width: the width of the rectangle to blur.height: the height of the rectangle to blur.radius: the radius of the blur.
RGBA ImageData as source:
StackBlur.imageDataRGBA(imageData, topX, topY, width, height, radius);
imageData: the canvas'ImageData.topX: the horizontal coordinate of the top-left corner of the rectangle to blur.topY: the vertical coordinate of the top-left corner of the rectangle to blur.width: the width of the rectangle to blur.height: the height of the rectangle to blur.radius: the radius of the blur.
RGB ImageData as source:
StackBlur.imageDataRGB(imageData, topX, topY, width, height, radius);
imageData: the canvas'ImageData.topX: the horizontal coordinate of the top-left corner of the rectangle to blur.topY: the vertical coordinate of the top-left corner of the rectangle to blur.width: the width of the rectangle to blur.height: the height of the rectangle to blur.radius: the radius of the blur.
Hacking
Building
This library is built using Rollup.
If you change something in the src/ folder, use the following command
to re-build the files in the dist/ folder:
npm run rollup
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
560,861 starspublic-apis/public-apis
A collective list of free APIs
497,105 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
441,758 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,164 stars