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.1.tar.gz (126.4 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.1-py3-none-any.whl (131.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jekillow-11.0.1.tar.gz
  • Upload date:
  • Size: 126.4 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.1.tar.gz
Algorithm Hash digest
SHA256 08b5de4077f543cbb3fb113c67665c769664bc9d7a867a0b973a70d1d6c950d5
MD5 f4723fd2c1c7cf1015883544e48a6308
BLAKE2b-256 4a4b86f5b0de2cdc92414196f2eb6d606b59a5e7aeb1286be6f6506d53047091

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jekillow-11.0.1-py3-none-any.whl
  • Upload date:
  • Size: 131.6 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e3930adf7483fd4275fdb4ceb63a64dda5b905d7b836b8886ca7bc5fd780a7ff
MD5 4ea12c5ee47a30fc15fff8e964fb143c
BLAKE2b-256 b37d430c1aaa9059617a39b3e4207e3f23151e3572fec2c2c77b2e425acfbc0d

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