Skip to content

A CLI tool for processing images, including conversion, compression, and renaming.

License

Notifications You must be signed in to change notification settings

DMaiGit/img-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mz-img-tools

A CLI tool for processing images, including conversion, compression, and renaming.

Install

You can use npx to execute this CLI tool directly without installing it globally.

npx mz-img-tools

Or you can install it globally:

npm install -g mz-img-tools

Usage

npx mz-img-tools [directory] [options]

Options

  • -o, --output <directory>: Specify output directory (optional)
  • -w, --width <number>: Target width (optional)
  • -h, --height <number>: Target height (optional)
  • -f, --format <string>: Target image format (jpg, jpeg, png, webp, jp2, bmp, optional)
  • -q, --quality <number>: Compression threshold (0~1, default 0.7)

Examples

Convert all images in a directory to JPEG format with a width of 800 pixels and a height of 600 pixels:

npx mz-img-tools /path/to/images -w 800 -h 600 -f jpeg -q 0.7

Convert all images to WebP format while maintaining original dimensions:

npx mz-img-tools /path/to/images -f webp -q 0.5

Process all images in the current directory with default settings:

npx mz-img-tools

License

This project is licensed under the ISC License. See the LICENSE file for details.


About

A CLI tool for processing images, including conversion, compression, and renaming.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published