library for instagram filters
Project description
pilgram
A python library for instagram filters.
The filter implementations are inspired by CSSgram.
Requirements
- Python 2 or 3
- 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 # 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.1.0.tar.gz
(764.4 kB
view details)
Built Distribution
pilgram-1.1.0-py3-none-any.whl
(802.9 kB
view details)
File details
Details for the file pilgram-1.1.0.tar.gz
.
File metadata
- Download URL: pilgram-1.1.0.tar.gz
- Upload date:
- Size: 764.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a51e76d0dd7c51d8eb3c0b737e76b8cef2c37303ad3af66505455d8582e28d96 |
|
MD5 | 9ab0d2c45568385a0c49f0e04c484618 |
|
BLAKE2b-256 | 7a054b920cbc92da4127bb033e2074e4327c34438c847a91d071ad038edfb8fa |
File details
Details for the file pilgram-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: pilgram-1.1.0-py3-none-any.whl
- Upload date:
- Size: 802.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c23d0a196aafd2bafb36898f5224b61df9801487f3eefb294479e627f26d416b |
|
MD5 | 664479ddcff439d5ff6a50fb94803ae6 |
|
BLAKE2b-256 | b0155aa5c5834cb53fbef07ba20f55b860ebd6de5feb804e3e98b7c074791672 |