Skip to content

carloe/duotone-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DUOTONE

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

Sample

Install

Local

git clone [email protected]:carloe/duotone.git
cd duotone
pip install -e .
duotone --help

Docker

git clone [email protected]: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

Releases

No releases published

Packages

No packages published