Skip to main content

library for instagram filters

Project description

pilgram

PyPI PyPI - Python Version Build Status codecov

A python library for instagram filters.

screenshot

The filter implementations are inspired by CSSgram.

Requirements

Install

pip install pillow # or pip install pillow-simd
pip install pilgram

Usage

Available instagram filters on pilgram: _1977, aden, brannan, brooklyn, clarendon, earlybird, gingham, hudson, inkwell, kelvin, lark, lofi, maven, mayfair, moon, nashville, perpetua, reyes, rise, slumber, stinson, toaster, valencia, walden, willow, xpro2

from PIL import Image
import pilgram

im = Image.open('sample.jpg')
pilgram.aden(im).save('sample-aden.jpg')

Similarly, pilgram provides css filters and blend modes as a by-product.

Available css filters on pilgram.css: contrast, grayscale, hue_rotate, saturate, sepia

from PIL import Image
import pilgram.css

im = Image.open('sample.jpg')
pilgram.css.sepia(im).save('sample-sepia.jpg')

Available blend modes on pilgram.css.blending: color, color_burn, color_dodge, exclusion, hard_light, hue, overlay, soft_light

from PIL import Image
import pilgram.css.blending

backdrop = Image.open('backdrop.jpg')
source = Image.open('source.jpg')
pilgram.css.blending.color(backdrop, source).save('blending.jpg')

Demo

Open In Colab

Test

pipenv install --dev
make test     # python 3
make test-tox # python 2 and 3

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

pilgram-1.0.3.tar.gz (762.0 kB view details)

Uploaded Source

Built Distribution

pilgram-1.0.3-py3-none-any.whl (792.5 kB view details)

Uploaded Python 3

File details

Details for the file pilgram-1.0.3.tar.gz.

File metadata

  • Download URL: pilgram-1.0.3.tar.gz
  • Upload date:
  • Size: 762.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for pilgram-1.0.3.tar.gz
Algorithm Hash digest
SHA256 99ed385d77187d68dc38191aa9dab725ec908dc3f393d64a16c5b0a20508a647
MD5 225ebc3aad7ba129e133dcc6713e1fd6
BLAKE2b-256 25721a8132188b4f8fe894605846c87f0befe16977a6affb18ed380f95615543

See more details on using hashes here.

File details

Details for the file pilgram-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: pilgram-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 792.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for pilgram-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 af3e6a14a81dd886bd9ceec61837f1a3d62128e710846a0f03697cdc66ecfb0e
MD5 b5bc84a09ae1e01e0456a8fd473d562d
BLAKE2b-256 dcd4f77daf0a4a27888a3fba4264ebb6122edc012b3eedf671ef5e760014088a

See more details on using hashes here.

Supported by

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