carloe / duotone-py

Duotone image effects in Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DUOTONE

Apply duotone effects to images with Python. Also check out the GPU acceleratedt Swift version.

Sample

Install

Local

git clone git@github.com:carloe/duotone.git
cd duotone
pip install -e .
duotone --help

Docker

git clone git@github.com:carloe/duotone.git
cd duotone
docker build . -t duotone
docker run duotone --help

Usage

Command Line

dutone --input input.png --light_color '#FFCB00' --dark_color '#38046C' --out output.png

Library

light_values = ImageColor.getrgb('#FFCB00')
dark_values = ImageColor.getrgb('#38046C')
image = Image.open('some.png')
result = Duotone.process(image, light_values, dark_values, contrast)
result.save('result.png', 'PNG')

License

MIT

About

Duotone image effects in Python

License:MIT License


Languages

Language:Python 96.2%Language:Dockerfile 3.8%