Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

stackblur-canvas

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stackblur-canvas

Fast and almost Gaussian blur by Mario Klingemann

  • 2.7.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created

What is stackblur-canvas?

The stackblur-canvas npm package is a JavaScript library that provides a fast and efficient way to apply a Stack Blur effect to images on HTML5 canvas elements. It is particularly useful for creating smooth, visually appealing blur effects in web applications.

What are stackblur-canvas's main functionalities?

Apply Stack Blur to Canvas

This feature allows you to apply a Stack Blur effect to an image drawn on an HTML5 canvas element. The blur radius can be adjusted to achieve the desired level of blur.

const StackBlur = require('stackblur-canvas');
const canvas = document.getElementById('myCanvas');
const context = canvas.getContext('2d');
const image = new Image();
image.src = 'path/to/image.jpg';
image.onload = function() {
  context.drawImage(image, 0, 0);
  StackBlur.canvasRGB(canvas, 0, 0, canvas.width, canvas.height, 20);
};

Apply Stack Blur to Image Data

This feature allows you to apply a Stack Blur effect directly to the image data of a canvas element. This can be useful for more advanced image processing tasks.

const StackBlur = require('stackblur-canvas');
const canvas = document.getElementById('myCanvas');
const context = canvas.getContext('2d');
const image = new Image();
image.src = 'path/to/image.jpg';
image.onload = function() {
  context.drawImage(image, 0, 0);
  const imageData = context.getImageData(0, 0, canvas.width, canvas.height);
  StackBlur.imageDataRGB(imageData, 0, 0, canvas.width, canvas.height, 20);
  context.putImageData(imageData, 0, 0);
};

Other packages similar to stackblur-canvas

Keywords

FAQs

Package last updated on 09 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc