image-filter-threshold
Advanced tools
Comparing version 2.0.0 to 2.0.1
{ | ||
"name": "image-filter-threshold", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Small library to apply a threshold transformation to a image", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -35,7 +35,5 @@ ![build status](https://travis-ci.org/canastro/image-filter-threshold.svg?branch=master) | ||
var imageThreshold = require('image-threshold'); | ||
var nWorkers = 4; | ||
imageThreshold({ | ||
data: IMAGE_DATA, | ||
threshold: 30 | ||
}); | ||
imageThreshold(IMAGE_DATA, { threshold: 30 }, nWorkers); | ||
``` | ||
@@ -66,10 +64,11 @@ | ||
var imageFilterCore = require('image-filter-core'); | ||
imageThreshold({ | ||
data: IMAGE_DATA | ||
}).then(function (result) { | ||
// result === ImageData object | ||
var image = document.createElement('img'); | ||
image.setAttribute('src', imageFilterCore.convertImageDataToCanvasURL(imageData)); | ||
target.appendChild(image); | ||
}); | ||
var nWorkers = 4; | ||
imageThreshold(IMAGE_DATA, { threshold: 30 }, nWorkers) | ||
.then(function (result) { | ||
// result === ImageData object | ||
var image = document.createElement('img'); | ||
image.setAttribute('src', imageFilterCore.convertImageDataToCanvasURL(imageData)); | ||
target.appendChild(image); | ||
}); | ||
``` |
@@ -22,3 +22,3 @@ var imageFilterCore = require('image-filter-core'); | ||
imageThreshold(data, { threshold: 50 }) | ||
imageThreshold(data, { threshold: 50 }, 4) | ||
.then(function (results) { | ||
@@ -28,3 +28,3 @@ applyResults('#target-1', canvas, context, results); | ||
imageThreshold(data, { threshold: 128 }) | ||
imageThreshold(data, { threshold: 128 }, 4) | ||
.then(function (results) { | ||
@@ -31,0 +31,0 @@ applyResults('#target-2', canvas, context, results); |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
64563
0
73