Socket
Socket
Sign inDemoInstall

@jimp/plugin-color

Package Overview
Dependencies
Maintainers
2
Versions
243
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jimp/plugin-color

Bitmap manipulation to adjust the color in an image.


Version published
Weekly downloads
1.3M
increased by5.95%
Maintainers
2
Weekly downloads
 
Created

What is @jimp/plugin-color?

@jimp/plugin-color is a plugin for the Jimp image processing library that provides various color manipulation functionalities. It allows users to perform operations such as adjusting brightness, contrast, and applying color filters to images.

What are @jimp/plugin-color's main functionalities?

Adjust Brightness

This feature allows you to adjust the brightness of an image. The value can range from -1 (darken) to 1 (brighten).

const Jimp = require('jimp');
Jimp.read('path/to/image.jpg').then(image => {
  image.brightness(0.5) // increase brightness by 50%
       .write('path/to/output.jpg');
});

Adjust Contrast

This feature allows you to adjust the contrast of an image. The value can range from -1 (decrease contrast) to 1 (increase contrast).

const Jimp = require('jimp');
Jimp.read('path/to/image.jpg').then(image => {
  image.contrast(0.5) // increase contrast by 50%
       .write('path/to/output.jpg');
});

Apply Color Filter

This feature allows you to apply a color filter to an image. You can specify the color and the intensity of the filter.

const Jimp = require('jimp');
Jimp.read('path/to/image.jpg').then(image => {
  image.color([{ apply: 'red', params: [100] }]) // apply red filter
       .write('path/to/output.jpg');
});

Other packages similar to @jimp/plugin-color

FAQs

Package last updated on 24 Feb 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc