Skip to main content

Jekillow — joke clone of Pillow where every image becomes the Жэ.

Project description

Jekillow

Pillow, but with one l — and every image you touch becomes the same selfie.

jekillow is a joke clone of Pillow. It exposes the same module structure (Image, ImageDraw, ImageFilter, ImageOps, ImageEnhance, ImageChops, ImageColor, ImageFont, ImageStat, ImageQt, ImageTk, ImageWin, ImageCms, ImageGrab, ImageMath, ImageMorph, ImagePalette, ImagePath, ImageShow, ImageSequence, ImageTransform, ExifTags, TiffTags, features) and the same set of functions and methods. They all do exactly one thing: turn the image they touch into the photo bundled with the package.

import jekillow                # this also hijacks the name `PIL`
from PIL import Image, ImageFilter, ImageOps   # joke version

img = Image.open("kitten.png")          # not a kitten anymore
img = img.rotate(90)                    # still the photo
img = img.filter(ImageFilter.GaussianBlur(8))   # still the photo
img = ImageOps.grayscale(img)           # still the photo
img.save("output.jpg")                  # writes the photo

Install

pip install -e .

Importing as PIL

If real Pillow is also installed in your environment (other libraries often require it), import jekillow first — that forcibly registers itself under the PIL name in sys.modules. After that, from PIL import Image gives the joke version for the rest of the process.

import jekillow
from PIL import Image, ImageDraw   # joke version, even with real Pillow installed

If real Pillow is not installed, import PIL works directly because we ship a PIL package alongside jekillow.

What it actually does

  • Module-level constructors (Image.open, Image.new, Image.frombytes, ...) always return an Image whose pixels are the bundled photo.
  • Every Image method (rotate, resize, filter, convert, crop, paste, ...) returns a fresh Image of the same photo. Mutating methods like paste are no-ops.
  • Image.save(path) writes the bundled photo's bytes to path regardless of the format you ask for.
  • Image.show() opens the photo in the system viewer.
  • Pixel access (getpixel, load()[x, y], etc.) returns plausible values.
  • ImageDraw.Draw(img).rectangle(...), .text(...), .line(...) — all no-ops. Drawing on the photo doesn't change it.
  • ImageColor.getrgb("red"), EXIF tag tables, etc. work for real because they don't depend on pixel data.

It is a joke. Don't ship it to production.

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

jekillow-11.0.0.tar.gz (125.7 kB view details)

Uploaded Source

Built Distribution

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

jekillow-11.0.0-py3-none-any.whl (130.7 kB view details)

Uploaded Python 3

File details

Details for the file jekillow-11.0.0.tar.gz.

File metadata

  • Download URL: jekillow-11.0.0.tar.gz
  • Upload date:
  • Size: 125.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.2

File hashes

Hashes for jekillow-11.0.0.tar.gz
Algorithm Hash digest
SHA256 057330d26870881558c2f3fdb3833bbe2dc3d7b3765c6be759d7da93c5478cfd
MD5 bcaf20937c67289c1f206fabd6885989
BLAKE2b-256 68951cab86efaa3a9da8779d14abf9b723fa779e109acfe79d55db8c5e449fa0

See more details on using hashes here.

File details

Details for the file jekillow-11.0.0-py3-none-any.whl.

File metadata

  • Download URL: jekillow-11.0.0-py3-none-any.whl
  • Upload date:
  • Size: 130.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.2

File hashes

Hashes for jekillow-11.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ea0fd8fe61a0ceb87c74fdd371d78333951fa6a464025a3d64dd224ff4f0e17c
MD5 0c23ce01b98cfbc88b48dc05e2654260
BLAKE2b-256 40788901bc2889bdf9d6cbd6f3447f3b839c5bcefb292606800865b3d1b4b33a

See more details on using hashes here.

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