tiny-pictor v0.0.2
Tiny Pictor
A tiny image compress cross-platform cli based on sharp.
This cli can process a single image or a directory of images.
If you specify a directory, Tiny Pictor will automatically output according to the original directory structure.
Install
Tiny Pictor runs on Node.js >= 18.17.0 and is available as a NPM package.
npm install -g tiny-pictor
Dev
If you want to contribute to Tiny Pictor, you will need to clone the repository and install the dependencies.
git clone
cd tiny-pictor
npm install
npm build
npm link
Then you can debug the CLI with tiny-pictor
or tp
command.
Usage
Tiny Pictor complete some basic image compress operations.
You can see the help information by tiny-pictor --help
or tp --help
.
Or you can read the document of sharp to learn more about the options.
Global Options
All command can use the global options as follow.
'-i, --input <input>', 'input image path'
'-o, --output <output>', 'output image path'
Resize
You can resize the image by tiny-pictor resize -i <input> -o <output> [options]
.
'-w, --width <width>', 'width of the output image'
'-h, --height <height>', 'height of the output image'
Other options are the same as the resize options of sharp. You should use complete option name like --withoutEnlargement
instead of -w
.
Contributing
Contributions are welcome and appreciated.
You can find Tiny Pictor on GitHub; feel free to open an issue or create a pull request.
For more information, read the contribution guide.