Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
@jimp/plugin-invert
Advanced tools
invert an image.
@jimp/plugin-invert is a plugin for the Jimp image processing library that allows you to invert the colors of an image. This can be useful for various image manipulation tasks, such as creating negative images or enhancing visual contrast.
Invert Colors
This feature inverts the colors of the image. The code reads an image from a specified path, inverts its colors, and then writes the modified image to a new file.
const Jimp = require('jimp');
Jimp.read('path/to/image.jpg')
.then(image => {
image.invert()
.write('path/to/output.jpg');
})
.catch(err => {
console.error(err);
});
Sharp is a high-performance image processing library that supports a wide range of image transformations, including color inversion. It is known for its speed and efficiency, especially with large images.
GraphicsMagick (gm) is a comprehensive image processing library that provides a wide array of image manipulation features, including color inversion. It is a Node.js wrapper for the GraphicsMagick command-line tool.
Image-js is a versatile image processing library for JavaScript that supports various image manipulation tasks, including color inversion. It is designed to be easy to use and integrate into web applications.
Invert an image's colors.
Invert an image's colors.
import jimp from "jimp";
async function main() {
const image = await jimp.read("test/image.png");
image.invert();
}
main();
FAQs
invert an image.
We found that @jimp/plugin-invert demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.