antigravityimageconverter
v1.0.2
Published
A production-ready CLI tool to convert image formats.
Readme
AntigravityImageConverter
A modern, fast, and production-ready CLI tool for converting image formats, powered by Node.js and Sharp.
NPM Package | GitHub Repository
Features
- Single Image Conversion: Convert any supported image file to another format.
- Batch Processing: Point to a directory and convert all supported images inside it recursively.
- High Performance: Built on top of
libvipsviasharpfor maximum speed and efficiency. - User Friendly UX: Provides elegant terminal output using
chalkandora.
Supported Formats
.jpg/.jpeg.png.webp.avif.tiff/.tif.bmp.ico.gif
Installation
You can install this package globally via npm:
npm install -g antigravityimageconverterUsage
Usage Command
agimgconv <input> --to <format> [options]<input>: Can be a path to a single file or a directory containing images.-t, --to <format>: The target format you want to convert the images to.-o, --out <dir>: (Optional) Specify an output directory for the converted files. If not provided, saves in the same folder.-r, --recursive: (Optional) If the input is a directory, searches for images in all subdirectories as well.-q, --quality <number>: (Optional) Set the output image quality (1-100) for supported formats (JPG, WEBP, AVIF, TIFF).
Examples
Convert a single image:
agimgconv input.jpg --to png
agimgconv image.png --to webpConvert an entire directory (recursively):
agimgconv ./images --to avif --recursiveConvert an entire directory (recursively) with a specific quality:
agimgconv ./images --to webp --out ./dist/images --recursive --quality 80View Help Page:
agimgconv --helpDeveloper Notes
This package uses ES Modules ("type": "module") and modern JavaScript features.
License
MIT License.
