An easy-to-use extension for PIL to edit and modify images.
Project description
Ez PIL
An easy-to-use extension for PIL to edit and modify images.
Installation
Python 3.12 or higher is required.
pip install ez-pil
Examples
Example for Discord Bot integration. For further information, see the Documentation.
import discord
import ezcord
from ez_pil import Editor, load_image_async
bot = ezcord.Bot()
@bot.slash_command()
async def circle(ctx):
# Load the image using `load_image_async` method
image = await load_image_async(ctx.author.display_avatar.url)
# Initialize the editor and pass image as a parameter
editor = Editor(image).circle_image()
# Creating File object from image_bytes from editor
file = discord.File(fp=editor.image_bytes, filename='circle.png')
await ctx.respond(file=file)
bot.run("TOKEN")
Contributing
If you want to contribute, follow the steps below:
- Fork the repository and clone it to your local machine.
- Install the dependencies using
pip install -r requirements-dev.txt. - Run
pre-commit installto set up pre-commit hooks. - Make your changes and create a pull request.
You can run tests locally:
pytest
pre-commit run -a
You can also run the documentation locally:
cd docs
make html
Now you can open _build/html/index.html in your browser.
Credits
This repository is a fork of easy-pil, because the original repository is no longer maintained 👻
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ez_pil-0.5.0.tar.gz.
File metadata
- Download URL: ez_pil-0.5.0.tar.gz
- Upload date:
- Size: 896.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68b8a6a09d543ad9537c30afc8067be66259853e3a82bbdb30b51c38eed6abf9
|
|
| MD5 |
344eaf8160c2e9063e08bbb8c258329e
|
|
| BLAKE2b-256 |
3858a52c6d0f398252cdfc20bb8d26549926e2df371abf7070045073aafe510c
|
Provenance
The following attestation bundles were made for ez_pil-0.5.0.tar.gz:
Publisher:
python-publish.yml on CookieAppTeam/ez-pil
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ez_pil-0.5.0.tar.gz -
Subject digest:
68b8a6a09d543ad9537c30afc8067be66259853e3a82bbdb30b51c38eed6abf9 - Sigstore transparency entry: 1409212207
- Sigstore integration time:
-
Permalink:
CookieAppTeam/ez-pil@365a989b046fec4bbea5d12fbc65ea3af6c46328 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/CookieAppTeam
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@365a989b046fec4bbea5d12fbc65ea3af6c46328 -
Trigger Event:
release
-
Statement type:
File details
Details for the file ez_pil-0.5.0-py3-none-any.whl.
File metadata
- Download URL: ez_pil-0.5.0-py3-none-any.whl
- Upload date:
- Size: 896.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c98a79455d65d0d7e6aaae69bd5dbf2650879129ed732dcf31faf261d16252b
|
|
| MD5 |
60732ab6e9b1fcc99b48032b387612aa
|
|
| BLAKE2b-256 |
96726fed4b46d8858a0aa836a8d1afebfe2acbdf8142344e1545d99c11d5bdcd
|
Provenance
The following attestation bundles were made for ez_pil-0.5.0-py3-none-any.whl:
Publisher:
python-publish.yml on CookieAppTeam/ez-pil
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ez_pil-0.5.0-py3-none-any.whl -
Subject digest:
5c98a79455d65d0d7e6aaae69bd5dbf2650879129ed732dcf31faf261d16252b - Sigstore transparency entry: 1409212231
- Sigstore integration time:
-
Permalink:
CookieAppTeam/ez-pil@365a989b046fec4bbea5d12fbc65ea3af6c46328 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/CookieAppTeam
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@365a989b046fec4bbea5d12fbc65ea3af6c46328 -
Trigger Event:
release
-
Statement type: