Automattic/node-canvas

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

Open

#1.063 geöffnet am 21. Dez. 2017

Auf GitHub ansehen
 (19 Kommentare) (24 Reaktionen) (0 zugewiesene Personen)JavaScript (1.140 Forks)batch import
FeatureHelp wanted

Repository-Metriken

Stars
 (9.524 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 34T 18h) (2 gemergte PRs in 30 T)

Beschreibung

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

Steps to Reproduce

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