image-contrast
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "image-contrast", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Small library to apply a contrast transformation to a image", | ||
@@ -9,4 +9,18 @@ "main": "index.js", | ||
}, | ||
"author": "", | ||
"author": "Ricardo Canastro", | ||
"license": "ISC", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/canastro/image-contrast" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/canastro/image-contrast/issues" | ||
}, | ||
"keywords": [ | ||
"image", | ||
"image-contrast", | ||
"contrast", | ||
"transformation", | ||
"pixel" | ||
], | ||
"devDependencies": { | ||
@@ -13,0 +27,0 @@ "browserify": "^13.0.0" |
@@ -18,19 +18,24 @@ var imageContrast = require('../index'); | ||
var context = canvas.getContext('2d'); | ||
var element = document.getElementById('from_data_original'); | ||
context.drawImage(element, 0, 0 ); | ||
var imageData = context.getImageData(0, 0, element.width, element.height); | ||
var img = new Image; | ||
img.onload = function(){ | ||
context.drawImage(img,0,0); | ||
var result3 = imageContrast({ | ||
imageData: imageData, | ||
to: '#target-3', | ||
contrast: 30 | ||
}); | ||
console.log('result3: ', result3); | ||
var imageData = context.getImageData(0, 0, img.width, img.height); | ||
var result4 = imageContrast({ | ||
imageData: imageData, | ||
to: '#target-4', | ||
contrast: 70 | ||
}); | ||
console.log(result4); | ||
var result3 = imageContrast({ | ||
imageData: imageData, | ||
to: '#target-3', | ||
contrast: 30 | ||
}); | ||
console.log('result3: ', result3); | ||
var result4 = imageContrast({ | ||
imageData: imageData, | ||
to: '#target-4', | ||
contrast: 70 | ||
}); | ||
console.log(result4); | ||
}; | ||
img.src = "http://lorempixel.com/400/200"; | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
5858
6
100
2
1
58
0