Skip to main content

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:

  1. Fork the repository and clone it to your local machine.
  2. Install the dependencies using pip install -r requirements-dev.txt.
  3. Run pre-commit install to set up pre-commit hooks.
  4. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ez_pil-0.5.0.tar.gz (896.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ez_pil-0.5.0-py3-none-any.whl (896.1 kB view details)

Uploaded Python 3

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

Hashes for ez_pil-0.5.0.tar.gz
Algorithm Hash digest
SHA256 68b8a6a09d543ad9537c30afc8067be66259853e3a82bbdb30b51c38eed6abf9
MD5 344eaf8160c2e9063e08bbb8c258329e
BLAKE2b-256 3858a52c6d0f398252cdfc20bb8d26549926e2df371abf7070045073aafe510c

See more details on using hashes here.

Provenance

The following attestation bundles were made for ez_pil-0.5.0.tar.gz:

Publisher: python-publish.yml on CookieAppTeam/ez-pil

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for ez_pil-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5c98a79455d65d0d7e6aaae69bd5dbf2650879129ed732dcf31faf261d16252b
MD5 60732ab6e9b1fcc99b48032b387612aa
BLAKE2b-256 96726fed4b46d8858a0aa836a8d1afebfe2acbdf8142344e1545d99c11d5bdcd

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page