Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
blend-mode
Advanced tools
Readme
a collection of channel-level blend modes, à la photoshop (shamelessly lifted from here, via here)
$ npm i blend-mode
var blend = require('blend-mode/soft-light')
// Blends two values, each between 0 and 255
// eg. pixel channel values
blend(0, 255)
var multiply = require('blend-mode/multiply')
var layer1 = [255, 128, 250, 255, 60, ...]
var layer2 = [156, 24, 18, 223, 119, ...]
// Where both layers are Uint8ClampedArrays acquired with
// canvas.getContext('2d').getImageData(0, 0, w, h).data
var blended = []
// Where blended is likely a Uint8ClampedArray acquired with
// canvas.getContext('2d').createImageData(0, 0, w, h).data
var total = Math.min(layer1.length, layer2.length)
for (var i = 0; i < total; i += 4) {
blended[i] = multiply(layer1[i], layer2[i])
blended[i + 1] = multiply(layer1[i + 1], layer2[i + 1])
blended[i + 2] = multiply(layer1[i + 2], layer2[i + 2])
// don’t blend alpha channels
blended[i + 3] = layer1[i + 3]
}
you should really only require the blend-mode/s you actually need, but if you must have the kitchen sink, it will cost you:
compression | size |
---|---|
blend-mode.js | 3.89 kB |
blend-mode.min.js | 2.76 kB |
blend-mode.min.js.gz | 832 B |
let’s just say MIT and hope for the best?
FAQs
a collection of channel-level blend modes, à la photoshop
We found that blend-mode demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.