image-blur-gaussian

0.0.115 • Public • Published

image-blur-gaussian

very fast gaussian image blur functions originally by Ivan Kutskir and Wojciech Jarosz.

works with [r,g,b,a ... ] data array.

for best results, use images with power-of-2 dimensions.

Installation

npm i image-blur-gaussian

Usage

Here we load pixel data from a PNG file, blur it, then save the result.

See results below.

var blur = require('image-blur-gaussian');
var img = require('image-sync').read('./cat.png'); //{width, height, data, saveAs}

//img.data has format [r,g,b,a, r,g,b,a ... ]

//blur the image
var radius = 16;
img.data = blur.blurImage(img.data,img.height,img.width,radius);

//save the result
img.saveAs(`./output.png`); 

original original

blurred 4 pixels blurred 4 pixels

blurred 8 pixels blurred 8 pixels

blurred 16 pixels blurred 16 pixels

See Also

stonks

Readme

Keywords

Package Sidebar

Install

npm i image-blur-gaussian

Weekly Downloads

8

Version

0.0.115

License

CC0-1.0

Unpacked Size

117 kB

Total Files

5

Last publish

Collaborators

  • stonkpunk