https://github.com/stellarsand/image-convert
Convert images to different formats.
https://github.com/stellarsand/image-convert
image image-conversion image-converter image-manipulation images linux macos python python-script python3 script terminal windows
Last synced: 2 months ago
JSON representation
Convert images to different formats.
- Host: GitHub
- URL: https://github.com/stellarsand/image-convert
- Owner: StellarSand
- License: gpl-3.0
- Created: 2023-07-23T21:09:26.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-22T15:30:59.000Z (over 2 years ago)
- Last Synced: 2025-09-17T22:18:15.760Z (9 months ago)
- Topics: image, image-conversion, image-converter, image-manipulation, images, linux, macos, python, python-script, python3, script, terminal, windows
- Language: Python
- Homepage:
- Size: 22.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# image-convert
**image-convert** tool allows you to convert images to different formats on GNU/Linux, macOS and Windows systems.
## Contents
- [Supported OS](#supported-os)
- [Prerequisites](#prerequisites)
- [Supported formats](#supported-formats)
- [Installation](#installation)
- [Available options](#available-options)
- [Usage](#usage)
- [Contributing](#contributing)
- [License](#license)
## Supported OS
- GNU/Linux
- Windows
- macOS
## Prerequisites
- [Python3](https://www.python.org/downloads/)
- [Pillow](https://pypi.org/project/Pillow/): Install using `pip install Pillow`
## Supported formats
- JPEG
- PNG
- WEBP
- TIFF
- BMP
- ICO
- ICNS
- PBM
- PGM
- PPM
## Installation
**1. Clone this repo:**
```
git clone https://github.com/StellarSand/image-convert.git
```
**2. Move into the project directory:**
```
cd image-convert
```
**3. Give executable permissions to the script (Not required for Windows):**
```
chmod +x image-convert
```
## Available options:
```
-h, --help Show this help message and exit
-f, --formats Show a list of supported output formats
-i, --input-files Path to the input image files
-o, --output-format Output format (e.g.: png, jpeg, etc.)
-d, --directory Output directory for converted images
-l, --lossy Perform lossy conversion (default: lossless, except for JPEG)
-p, --parallel Convert images in parallel
```
**NOTE**:
If -p/--parallel option is used, multiple images will be converted in parallel.
This will be faster, however, it might use a lot of system resources if too many images are provided.
## Usage
```
python3 image-convert -i -o
```
```
python3 image-convert -i -o
```
**Examples:**
```
python3 image-convert -i icon.png -o jpeg
```
```
python3 image-convert -i icon1.png icon2.jpg icon3.webp -o tiff -d /home/user/Downloads
```
```
python3 image-convert -i icon1.png icon2.jpg -o webp -l -p
```
**Convert all images with a specified format:**
```
python3 img-pdf-convert -i *.png *.jpg -o webp
```
## Contributing
Pull requests can be submitted [here](https://github.com/StellarSand/image-convert/pulls).
## License
This project is licensed under the terms of [GPLv3 license](https://github.com/StellarSand/image-convert/blob/main/LICENSE).