New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

img-convertor

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

img-convertor

**img-convertor** is a simple and efficient command-line tool for converting images from one format to another. It recursively processes all image files in the current directory and converts them to the specified format. The tool is globally installed and

  • 1.0.7
  • npm
  • Socket score

Version published
Weekly downloads
10
increased by233.33%
Maintainers
0
Weekly downloads
 
Created
Source

img-convertor

img-convertor is a simple and efficient command-line tool for converting images from one format to another. It recursively processes all image files in the current directory and converts them to the specified format. The tool is globally installed and provides a convert command.

Features

  • Supports popular image formats: png, jpg, jpeg, webp, gif, and bmp.
  • Recursively processes all subdirectories in the current working directory.
  • Automatically creates a target directory for storing converted images.

Installation

To install the package globally, run:

npm install -g img-convertor

Usage

Basic Usage

Convert all images in the current directory to a specified format:

convert <target-format>

For example, to convert all images to webp:

convert webp

Advanced Usage

Specify the source image formats to convert from:

convert <source-formats> <target-format>

For example, to convert only jpg and png images to gif:

convert jpg,png gif

If no source formats are specified, the tool will process all supported formats by default.

Output

The converted images will be saved in a target directory, maintaining the original directory structure.

Example

Given a directory structure:

.
├── images
│   ├── photo.jpg
│   └── icon.png

Running the command:

convert webp

Will create the following structure:

.
├── images
│   ├── photo.jpg
│   └── icon.png
└── target
    ├── images
    │   ├── photo.webp
    │   └── icon.webp

Dependencies

This package depends on the sharp library for image processing. Make sure it is correctly installed during the global installation.

License

This project is licensed under the ISC License.

FAQs

Package last updated on 29 Aug 2024

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