Image Toolkit App v0.1
Author GitHub name: jedahee Author name: Jesús Daza
Image Toolkit is a console application that offers multiple tools for quickly and easily editing one or more images.
What can Image Toolkit do for you?
- Reduce the size of images.
- Resize and scale.
- Convert file extensions (png, jpg, jpeg...).
- Convert to black and white.
- Apply filters.
- Add text to images.
- Create thumbnails.
Image Toolkit Workflow
-
Script entry:
- Welcome message.
- The user selects an option from the menu.
- The user specifies the path containing the images.
- The user selects the images they want to edit.
-
Depending on the selected option:
- Reduce the size of images:
- Specify the maximum size in KB.
- Option to resize if the image is too large.
- Option to force size reduction, sacrificing quality.
- Resize or scale:
- Warning about quality loss when increasing size.
- Specify width and height or scaling percentage.
- Convert file extensions:
- Select the new format (JPEG, PNG, BMP).
- Option to rename files.
- Apply filters:
- Select a filter from the available catalog.
- Add text to images:
- Specify text, font, color, and position.
- Create thumbnails:
- Select the thumbnail size.
- Option to convert to .ICO format for favicons.
- Reduce the size of images:
-
Script exit:
- Edited images are saved in the
./new_imagesfolder.
- Edited images are saved in the
Project Structure (PyPI):
imagetoolkit/
├── src/ # Main module of the tool
│ ├── imagetoolkit/
│ ├── __init__.py # Package initializer
│ ├── cli.py # Code for the command-line interface (arguments and execution)
│ ├── imagetoolkit.py # Main file
│ ├── compress.py # Functions for resizing/compressing images
│ ├── rescale.py # Functions related to resizing images
│ ├── extension.py # Functions for editing the name and extension of images
│ ├── color.py # Functions for manipulating colors (color adjustments, black & white, etc.)
│ ├── addtext.py # Functions for adding text to images
│ ├── utils.py # Auxiliary functions and general tools (e.g., path validation, error handling)
│ └── variables.py # Global variables
├── requirements.txt # Project dependencies (Pillow, click, etc.)
├── README.md # Project documentation
├── setup.py # Package configuration if you plan to distribute it
└── .gitignore # Files to ignore in version control (environment, etc.)
Requirements
- Python 3.x
- Dependencies:
Pillowquestionaryprompt-toolkitpromptsetuptoolsPygmentsregexwcwidthsix
Install dependencies with:
pip install -r requirements.txt
Usage
Interactive Mode (Local)
Run the script without arguments to start interactive mode:
python src/imagetoolkit/imagetoolkit.py
Interactive Mode (Deb Package - PyPI)
Run the script without arguments to start interactive mode:
imagetoolkit
CLI Mode (Local)
You can use the command-line interface by passing arguments. Example:
python src/imagetoolkit/imagetoolkit.py reduce --input ./img --output ./compressed --max-size 1024KB --resize --quality
python src/imagetoolkit/imagetoolkit.py resize --input ./img --output ./resized --mode fixed --dimensions 800 600
python src/imagetoolkit/imagetoolkit.py convert --input ./img --output ./converted --format PNG --rename --basename newimage
python src/imagetoolkit/imagetoolkit.py filter --input ./img --output ./filtered --filter grayscale
python src/imagetoolkit/imagetoolkit.py add-text --input ./img --output ./with-text --text 'Watermark' --color white --position 'Bottom Right' --size 5.0
CLI Mode (Deb Package - PyPI)
You can use the command-line interface by passing arguments. Example:
imagetoolkit reduce --input ./img --output ./compressed --max-size 1024KB --resize --quality
imagetoolkit resize --input ./img --output ./resized --mode fixed --dimensions 800 600
imagetoolkit convert --input ./img --output ./converted --format PNG --rename --basename newimage
imagetoolkit filter --input ./img --output ./filtered --filter grayscale
imagetoolkit add-text --input ./img --output ./with-text --text 'Watermark' --color white --position 'Bottom Right' --size 5.0
Contributions
Contributions are welcome! If you want to improve this project, follow these steps:
- Fork the repository.
- Create a branch with your new feature:
git checkout -b feature/new-feature
- Make your changes and commit:
git commit -m 'Add new feature'
- Push to the branch:
git push origin feature/new-feature
- Open a Pull Request.
License
This project is licensed under the Creative Commons Zero v1.0 Universal License. See the LICENSE file for details.
Thank you for using Image Toolkit! 😊
Metadata
Release files for imagetoolkit 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| imagetoolkit-0.1.1.tar.gz | 20.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| imagetoolkit-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.2 kB
Release files / imagetoolkit-0.1.1.tar.gz
| Download URL | imagetoolkit-0.1.1.tar.gz |
|---|---|
| Size | 20.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8dfc4c0f052d87d63b48c6c5b4b6c2f43945bf30569502f4a84ce3af83dfc3f
|
|
BLAKE2b-256 checksum How to use checksums |
7aa0dfdf14b479c45a46dee41b487934418584aa6f37066367b94308bbb8f8a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / imagetoolkit-0.1.1-py3-none-any.whl
| Download URL | imagetoolkit-0.1.1-py3-none-any.whl |
|---|---|
| Size | 22.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a0617fcd2daf97d9b92c6e84e149ce69ef243f1f11c5a059066a94c03e359e44
|
|
BLAKE2b-256 checksum How to use checksums |
31cedb4ac5040714e38f3dc010c42e8f55f5bb2d48ed4a285805963b83ff928b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|