Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thieryw/dir-image-converter
https://github.com/thieryw/dir-image-converter
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/thieryw/dir-image-converter
- Owner: thieryw
- License: mit
- Created: 2023-09-16T21:11:21.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-17T14:24:47.000Z (over 1 year ago)
- Last Synced: 2024-11-17T10:26:59.805Z (3 months ago)
- Language: TypeScript
- Size: 10.2 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dir-image-converter
**dir-image-converter** is a utility that allows users to resize and convert images within a directory structure. The module provides two primary commands for this purpose: `convert-images` and `resize-images`.
## Installation
```bash
npm install dir-image-converter -g
```## Features
### 1. Convert Images
Command: `convert-images`
This command will convert images from the specified directory to the desired format. Supported formats include: `png`, `jpeg`, `webp`, `avif`, `heif`, `tiff`, `jp2`, and `jxl`.
Usage:
```bash
convert-images -a [Path to the assets] -o [Path to save the converted images] -f [Format to convert to]
```Options:
- `-a, --assets`: Path to the assets (Required).
- `-o, --output`: Path to save the converted images (Required).
- `-f, --format`: Format to convert to (Required).
- `-ov, --override`: Override existing output folder (Optional).### 2. Resize Images
Command: `resize-images`
This command will resize images from the specified directory to the provided sizes.
Usage:
```bash
resize-images -a [Path to the assets] -o [Path to save the resized images] -s [Sizes and size aliases, e.g., 2500,large]
```Options:
- `-a, --assets`: Path to the assets (Required).
- `-o, --output`: Path to save the resized images (Required).
- `-s, --sizes`: Sizes and size aliases, e.g., `2500,large` (Required).
- `-ov, --override`: Override existing output folder (Optional).## Repository
For more details and to access the source code, visit the [GitHub Repository](https://github.com/thieryw/dir-image-converter).
## License
This project is licensed under the MIT License.