Gathering detailed insights and metrics for stackblur-canvas
Gathering detailed insights and metrics for stackblur-canvas
Gathering detailed insights and metrics for stackblur-canvas
Gathering detailed insights and metrics for stackblur-canvas
npm install stackblur-canvas
Typescript
Module System
Min. Node Version
Node Version
NPM Version
99.4
Supply Chain
99.1
Quality
78.3
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
286,921,900
Last Day
100,486
Last Week
2,304,065
Last Month
9,905,573
Last Year
91,256,016
MIT License
1,295 Stars
99 Commits
125 Forks
20 Watchers
2 Branches
13 Contributors
Updated on Jun 25, 2025
Minified
Minified + Gzipped
Latest Version
2.7.0
Package Id
stackblur-canvas@2.7.0
Unpacked Size
148.13 kB
Size
27.26 kB
File Count
15
NPM Version
9.5.1
Node Version
18.16.0
Published on
Feb 09, 2024
Cumulative downloads
Total Downloads
Last Day
-6.6%
100,486
Compared to previous day
Last Week
-7.4%
2,304,065
Compared to previous week
Last Month
5.5%
9,905,573
Compared to previous month
Last Year
41.2%
91,256,016
Compared to previous year
27
StackBlur.js is a fast, almost Gaussian blur created by Mario Klingemann.
Original source:
To use the standalone version,
download the latest zip from Github or clone the repository
git clone git@github.com:flozz/StackBlur.git
and include the dist/stackblur.js
or dist/stackblur.min.js
file in your HTML page:
1<script src="StackBlur/dist/stackblur.js"></script>
To use the NPM package,
install the package:
npm install --save stackblur-canvas
and require it where needed
1const StackBlur = require('stackblur-canvas');
If you are only supporting modern browsers, you may use ES6 Modules directly:
1import * as StackBlur from 2 './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:
1import * as StackBlur from 'stackblur-canvas';
See also the docs in docs/jsdoc.
Image as source:
1StackBlur.image(sourceImage, targetCanvas, radius, blurAlphaChannel);
sourceImage
: the HTMLImageElement
or its id
.targetCanvas
: the HTMLCanvasElement
or its id
.radius
: the radius of the blur.blurAlphaChannel
: Set it to true
if you want to blur a RGBA image (optional, default = false
)RGBA Canvas as source:
1StackBlur.canvasRGBA(targetCanvas, top_x, top_y, width, height, radius);
targetCanvas
: the HTMLCanvasElement
.top_x
: the horizontal coordinate of the top-left corner of the rectangle to blur.top_y
: 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:
1StackBlur.canvasRGB(targetCanvas, top_x, top_y, width, height, radius);
targetCanvas
: the HTMLCanvasElement
.top_x
: the horizontal coordinate of the top-left corner of the rectangle to blur.top_y
: 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:
1StackBlur.imageDataRGBA(imageData, top_x, top_y, width, height, radius);
imageData
: the canvas' ImageData
.top_x
: the horizontal coordinate of the top-left corner of the rectangle to blur.top_y
: 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:
1StackBlur.imageDataRGB(imageData, top_x, top_y, width, height, radius);
imageData
: the canvas' ImageData
.top_x
: the horizontal coordinate of the top-left corner of the rectangle to blur.top_y
: 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.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
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 2/5 approved changesets -- score normalized to 4
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
21 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More