Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Small library that relies on webworkers to apply image transformations.
There are several modules that use lens-core
, such as:
But you can easily create your own transformation function and rely on lens-core
to handle the webworkers and to split the work.
npm install lens-core --save
It returns a canvas with the given width and height
var lensCore = require('lens-core');
var canvas = lensCore.getCanvas(100, 100);
Given a ImageData it returns the dataURL
var lensCore = require('lens-core');
var canvasURL = lensCore.convertImageDataToCanvasURL(imageData);
Provide the ImageData, the transformation function, the options to be passed to the transformation function and the number of workers to split the work.
var lensCore = require('lens-core');
lensCore.apply(data, transform, options, nWorkers)
.then(function (imageData) {
// Do whatever you want with imageData
});
The transform function receives ImageData, the length of data to transform and the options that the developer provided to image-fiter-core, example transformation function for the threshold effect:
function transform (data, length, options) {
for (var i = 0; i < length; i += 4) {
var r = data[i];
var g = data[i + 1];
var b = data[i + 2];
var v = (0.2126 * r + 0.7152 * g + 0.0722 * b >= options.threshold) ? 255 : 0;
data[i] = data[i + 1] = data[i + 2] = v;
}
}
FAQs
Core module for lens-filter
The npm package lens-core receives a total of 5 weekly downloads. As such, lens-core popularity was classified as not popular.
We found that lens-core 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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.