Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
looks-same
Advanced tools
Pure node.js library for comparing PNG-images, taking into account human color perception.
Pure node.js library for comparing PNG-images, taking into account human color perception.
It is created specially for the needs of visual regression testing for gemini
utility, but can be used for other purposes.
var looksSame = require('looks-same');
looksSame('image1.png', 'image2.png', function(error, equal) {
//equal will be true, if images looks the same
});
Parameters can be paths to files or buffer with compressed png
image.
By default, it will detect only noticeable differences. If you wish to detect any difference,
use strict
options:
looksSame('image1.png', 'image2.png', {strict: true}, function(error, equal) {
...
});
For visual regression tasks it may be useful to ignore text caret in text input elements.
You can do it with ignoreCaret
option.
looksSame('image1.png', 'image2.png', {ignoreCaret: true}, function(error, equal) {
...
});
Both strict
and ignoreCaret
can be set independently of one another.
looksSame.createDiff({
reference: '/path/to/reference/image.png',
current: '/path/to/reference/image.png',
diff: '/path/to/save/diff/to.png',
highlightColor: '#ff00ff' //color to highlight the differences
strict: true //strict comparsion
}, function(error) {
});
FAQs
Pure node.js library for comparing PNG-images, taking into account human color perception.
We found that looks-same demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 10 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.