library for instagram filters
Project description
pilgram
A python library for instagram filters.
The filter implementations are inspired by CSSgram.
Requirements
- Python >= 3.4
- Pillow or pillow-simd
Install
pip install pillow>=4.1.0 # 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
darken
difference
exclusion
hard_light
hue
lighten
multiply
normal
overlay
screen
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
Filter performance comparison with instagram-filters
Test
pipenv install --dev
make test # pytest
make test-tox # pytest with tox
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.2.1.tar.gz
(778.5 kB
view details)
Built Distribution
pilgram-1.2.1-py3-none-any.whl
(817.4 kB
view details)
File details
Details for the file pilgram-1.2.1.tar.gz
.
File metadata
- Download URL: pilgram-1.2.1.tar.gz
- Upload date:
- Size: 778.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a269eb1899958afbaa54163a2779d296fb4fc8674d994fbbeede3e422bbc9387 |
|
MD5 | 084cfb0a6bcbc93a84965bbeb90a63cc |
|
BLAKE2b-256 | 7b08bea089838fb44076a209d2e96d5333e85dff7e48a4046c0e1bf9ed823b53 |
File details
Details for the file pilgram-1.2.1-py3-none-any.whl
.
File metadata
- Download URL: pilgram-1.2.1-py3-none-any.whl
- Upload date:
- Size: 817.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08b9130e06ff40b51acabc313660621895259ab206d76ded4bc73a3b69f6f9c2 |
|
MD5 | 9917750953aaef8ffc6fef129b7183d7 |
|
BLAKE2b-256 | 6858ed90396587f3a7cc23673d6bb3a161127625a309861946c528d162dd21ee |