Automattic / Automattic/node-canvas

Use standard Canvas `ctx.filter` API (blur/grayscale/saturate/contrast)

Open
#1,063 19 comments 24 reactions 0 assignees View on GitHub
Feature Help wanted
Dominant language
JavaScript
Stars
10.7k
Forks
1.2k
Avg merge
4d 8h
Merged PRs (30d)
1

Description

HTML5 Canvas recently introduced support for filters like `ctx.filter = "blur(5px)";` in the browser, for example to `blur`, `saturate`, `grayscale` and modify `contrast`.

## Issue or Feature
API support for HTML5 Canvas `ctx.filter` from [from MDN web docs](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/filter)

## Steps to Reproduce
```js
var Canvas = require('canvas');
var canvas = Canvas.createCanvas(200, 200);
var ctx = canvas.getContext('2d');
ctx.filter = "blur(5px)";
ctx.drawImage(img,0,0);
```

## Your Environment
* node-canvas: 2.0.0 alpha
* node: v9.3.0
* macOS: High Sierra

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.