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.
image-filter-sepia
Advanced tools
Small library to apply a sepia transformation to a image.
npm install image-filter-sepia --save
It applies a sepia transformation to a base64 image. If you want a more complete library, please check image-filters that wraps this and other libraries to provide a more complete suite of image filters.
The default operation of this library is to consume imageData and return transformed imageData, but to facilitate a bit you can pass asDataURL
as true to return a dataURL that you can inject into a image tag.
JS file:
var imageFilterSepia = require('image-sepia');
var result = imageFilterSepia({
data: IMAGE_DATA,
asDataURL: true //if you want data to data transformation you don't need to include this
});
var element = document.getElementById('#dummy-image');
var canvas = document.createElement('canvas');
var context = canvas.getContext('2d');
context.drawImage(element, 0, 0 );
var imageData = context.getImageData(0, 0, element.width, element.height);
var element = document.createElement('img');
element.setAttribute('src', options.url);
//...repeat process from the previous answer
var result = imageFilterSepia({
data: IMAGE_DATA
});
var image = document.createElement('img');
image.setAttribute('src', result);
var target = document.getElementById('#dummy-target');
target.appendChild(image);
FAQs
Small library to apply a sepia transformation to a image
The npm package image-filter-sepia receives a total of 0 weekly downloads. As such, image-filter-sepia popularity was classified as not popular.
We found that image-filter-sepia 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.