![Logo](assets/banner.png)
![PyPI](https://img.shields.io/pypi/v/...)
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/ValentinKolb/jpeg_converter/ci.yml)
Img-Tool is a versatile CLI tool designed to convert standard (baseline) JPEG images into progressive JPEGs.
It streamlines the process of handling large batches of images, offering additional features like thumbnail creation, compression control, metadata management, and more.
## Installation
To install the tool, simply run the following command:
```bash
pip install todo
```
## Usage
After installation, you can start using JPEG Converter by executing:
```bash
jpeg-converter [OPTIONS] INPUT_PATH
```
## Features
JPEG Converter comes with a variety of features to manage and optimize your JPEG images efficiently:
- Convert Baseline to Progressive JPEG: Easily convert single images or entire directories from baseline to progressive JPEG format.
- Batch Processing: Handle multiple images at once, with support for recursive directory traversal.
- Thumbnail Generation: Create thumbnails with various specifications, including cropping and resizing.
- Compression Control: Adjust compression levels to balance image quality and file size.
- Metadata Management: Remove EXIF metadata to protect privacy or embed custom copyright information.
## Configuration
JPEG Converter can be configured using command-line options. Below is a table of available options:
| Option | Description |
|----------------------------------|------------------------------------------------------------------------------------------------------------------|
| `--output-dir PATH` | Directory to save the output images. If not specified, original images will be overwritten after confirmation. |
| `--thumb TEXT` | Thumbnail specification. Formats: <br> - WxH (e.g., 100x300) - Crop to WxH from center <br> - WxHt (e.g., 100x300t) - Crop from top <br> - WxHb (e.g., 100x300b) - Crop from bottom <br> - WxHf (e.g., 100x300f) - Fit inside WxH without cropping <br> - 0xH (e.g., 0x300) - Resize to height H, preserving aspect ratio <br> - Wx0 (e.g., 100x0) - Resize to width W, preserving aspect ratio |
| `--thumb-dir PATH` | Directory to save thumbnails. Required when --thumb is used. |
| `--compress [low, medium, high]` | Compression level for the output images. |
| `--verbose` | Enable verbose output during processing. |
| `--recursive` | Process directories recursively, including subdirectories. |
| `--remove-metadata` | Remove EXIF metadata from images. |
| `--copyright-text TEXT` | Add copyright text to the image metadata. Note: Ignored if --remove-metadata is used. |
## Examples
## Examples
### Basic Conversion
Convert a single image and overwrite the original after confirmation:
```bash
jpeg-converter path/to/image.jpg
```
### Convert All Images in a Directory
Convert all JPEG images in a directory and save the outputs to another directory:
```bash
jpeg-converter path/to/input_directory --output-dir path/to/output_directory
```
### Batch Conversion with Compression and Metadata Removal
Convert all images with high compression and remove EXIF metadata:
```bash
jpeg-converter path/to/input_directory --compress=high --remove-metadata
```
### Create Thumbnails
Create thumbnails with center cropping:
```bash
jpeg-converter path/to/input_directory --thumb=100x300 --thumb-dir path/to/thumbnails/
```
### Combine Multiple Options
Convert images, create thumbnails, set compression level, enable verbose output, process directories recursively, and add copyright:
```bash
jpeg-converter path/to/input_directory \
--output-dir path/to/output_directory \
--thumb=150x150f \
--thumb-dir path/to/thumbnails/ \
--compress=medium \
--recursive \
--verbose \
--remove-metadata \
--copyright-text="© 2024 Your Name"
```
## License
Distributed under the MIT License. See LICENSE for more information.
Raw data
{
"_id": null,
"home_page": "https://github.com/ValentinKolb/jpegger",
"name": "jpegger",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": "cli, image, optimisation, web",
"author": "valentinkolb",
"author_email": "mail@valentin-kolb.com",
"download_url": "https://files.pythonhosted.org/packages/a0/9e/016a6b9c31a488bdb422883751f34ee979bb294de07c1891d9d511ace56e/jpegger-1.0.0.tar.gz",
"platform": null,
"description": "![Logo](assets/banner.png)\n\n![PyPI](https://img.shields.io/pypi/v/...)\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/ValentinKolb/jpeg_converter/ci.yml)\n\nImg-Tool is a versatile CLI tool designed to convert standard (baseline) JPEG images into progressive JPEGs.\nIt streamlines the process of handling large batches of images, offering additional features like thumbnail creation, compression control, metadata management, and more.\n\n## Installation\n\nTo install the tool, simply run the following command:\n\n```bash\npip install todo\n```\n\n## Usage\n\nAfter installation, you can start using JPEG Converter by executing:\n\n```bash\njpeg-converter [OPTIONS] INPUT_PATH\n```\n\n## Features\n\nJPEG Converter comes with a variety of features to manage and optimize your JPEG images efficiently:\n- Convert Baseline to Progressive JPEG: Easily convert single images or entire directories from baseline to progressive JPEG format.\n- Batch Processing: Handle multiple images at once, with support for recursive directory traversal.\n- Thumbnail Generation: Create thumbnails with various specifications, including cropping and resizing.\n- Compression Control: Adjust compression levels to balance image quality and file size.\n- Metadata Management: Remove EXIF metadata to protect privacy or embed custom copyright information.\n\n## Configuration\n\nJPEG Converter can be configured using command-line options. Below is a table of available options:\n\n| Option | Description |\n|----------------------------------|------------------------------------------------------------------------------------------------------------------|\n| `--output-dir PATH` | Directory to save the output images. If not specified, original images will be overwritten after confirmation. |\n| `--thumb TEXT` | Thumbnail specification. Formats: <br> - WxH (e.g., 100x300) - Crop to WxH from center <br> - WxHt (e.g., 100x300t) - Crop from top <br> - WxHb (e.g., 100x300b) - Crop from bottom <br> - WxHf (e.g., 100x300f) - Fit inside WxH without cropping <br> - 0xH (e.g., 0x300) - Resize to height H, preserving aspect ratio <br> - Wx0 (e.g., 100x0) - Resize to width W, preserving aspect ratio |\n| `--thumb-dir PATH` | Directory to save thumbnails. Required when --thumb is used. |\n| `--compress [low, medium, high]` | Compression level for the output images. |\n| `--verbose` | Enable verbose output during processing. |\n| `--recursive` | Process directories recursively, including subdirectories. |\n| `--remove-metadata` | Remove EXIF metadata from images. |\n| `--copyright-text TEXT` | Add copyright text to the image metadata. Note: Ignored if --remove-metadata is used. |\n\n## Examples\n\n## Examples\n\n### Basic Conversion\n\nConvert a single image and overwrite the original after confirmation:\n\n```bash\njpeg-converter path/to/image.jpg\n```\n\n### Convert All Images in a Directory\n\nConvert all JPEG images in a directory and save the outputs to another directory:\n\n```bash\njpeg-converter path/to/input_directory --output-dir path/to/output_directory\n```\n\n### Batch Conversion with Compression and Metadata Removal\n\nConvert all images with high compression and remove EXIF metadata:\n\n```bash\njpeg-converter path/to/input_directory --compress=high --remove-metadata\n```\n\n### Create Thumbnails\n\nCreate thumbnails with center cropping:\n\n```bash\njpeg-converter path/to/input_directory --thumb=100x300 --thumb-dir path/to/thumbnails/\n```\n\n### Combine Multiple Options\n\nConvert images, create thumbnails, set compression level, enable verbose output, process directories recursively, and add copyright:\n\n```bash\njpeg-converter path/to/input_directory \\\n --output-dir path/to/output_directory \\\n --thumb=150x150f \\\n --thumb-dir path/to/thumbnails/ \\\n --compress=medium \\\n --recursive \\\n --verbose \\\n --remove-metadata \\\n --copyright-text=\"\u00a9 2024 Your Name\"\n```\n\n## License\n\nDistributed under the MIT License. See LICENSE for more information.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python Script to optimise images for websites",
"version": "1.0.0",
"project_urls": {
"Homepage": "https://github.com/ValentinKolb/jpegger"
},
"split_keywords": [
"cli",
" image",
" optimisation",
" web"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b8b23eea33b92e95db5fed5d7cbd21365ade6e5dcca3e9aba75a9fa89276152d",
"md5": "322f11bbfc4c64e4ce541222db1f1626",
"sha256": "530633ffdbb28c428b5489497b63d6d3862ca220482c382c11264de2b3f50a1d"
},
"downloads": -1,
"filename": "jpegger-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "322f11bbfc4c64e4ce541222db1f1626",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 7216,
"upload_time": "2024-11-26T02:37:10",
"upload_time_iso_8601": "2024-11-26T02:37:10.058524Z",
"url": "https://files.pythonhosted.org/packages/b8/b2/3eea33b92e95db5fed5d7cbd21365ade6e5dcca3e9aba75a9fa89276152d/jpegger-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a09e016a6b9c31a488bdb422883751f34ee979bb294de07c1891d9d511ace56e",
"md5": "a05d010dbb923fa6d2619a07b2e6193f",
"sha256": "2d2b182719cf93345a2cf3370241858531da268add680a519d64aad30b371813"
},
"downloads": -1,
"filename": "jpegger-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "a05d010dbb923fa6d2619a07b2e6193f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 6216,
"upload_time": "2024-11-26T02:37:11",
"upload_time_iso_8601": "2024-11-26T02:37:11.825162Z",
"url": "https://files.pythonhosted.org/packages/a0/9e/016a6b9c31a488bdb422883751f34ee979bb294de07c1891d9d511ace56e/jpegger-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-26 02:37:11",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ValentinKolb",
"github_project": "jpegger",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "jpegger"
}