image-filter-grayscale
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -0,1 +1,7 @@ | ||
function copyImageData(ctx, src) { | ||
var dst = ctx.createImageData(src.width, src.height); | ||
dst.data.set(src.data); | ||
return dst; | ||
} | ||
function transform(canvas, context, imageData) { | ||
@@ -34,3 +40,5 @@ var data = imageData.data; | ||
options.data = copyImageData(context, options.data); | ||
return transform(canvas, context, options.data); | ||
} |
{ | ||
"name": "image-filter-grayscale", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Small library to apply a grayscale transformation to a image", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
3633
59