Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@jimp/core

Package Overview
Dependencies
Maintainers
2
Versions
240
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jimp/core

Jimp core

  • 0.9.3-canary.825.599.0
  • npm
  • Socket score

Version published
Weekly downloads
587K
decreased by-51%
Maintainers
2
Weekly downloads
 
Created

What is @jimp/core?

@jimp/core is a JavaScript Image Manipulation Program (JIMP) that allows you to perform various image processing tasks such as resizing, cropping, and applying filters. It is designed to be simple and easy to use, making it a popular choice for developers who need to manipulate images in their Node.js applications.

What are @jimp/core's main functionalities?

Resizing Images

This feature allows you to resize images to specified dimensions. The code sample reads an image, resizes it to 256x256 pixels, and then saves the resized image.

const Jimp = require('@jimp/core');
Jimp.read('path/to/image.jpg').then(image => {
  image.resize(256, 256) // resize to 256x256
       .write('path/to/resized_image.jpg'); // save
}).catch(err => {
  console.error(err);
});

Cropping Images

This feature allows you to crop a specific area of an image. The code sample reads an image, crops a 200x200 pixel area starting from coordinates (50, 50), and then saves the cropped image.

const Jimp = require('@jimp/core');
Jimp.read('path/to/image.jpg').then(image => {
  image.crop(50, 50, 200, 200) // crop a 200x200 square starting at (50, 50)
       .write('path/to/cropped_image.jpg'); // save
}).catch(err => {
  console.error(err);
});

Applying Filters

This feature allows you to apply various filters to images. The code sample reads an image, applies a sepia filter, and then saves the filtered image.

const Jimp = require('@jimp/core');
Jimp.read('path/to/image.jpg').then(image => {
  image.sepia() // apply sepia filter
       .write('path/to/sepia_image.jpg'); // save
}).catch(err => {
  console.error(err);
});

Other packages similar to @jimp/core

FAQs

Package last updated on 26 Nov 2019

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