maco 0.1.0

CLI tool and library used to convert manga for reading on e-ink devices.
Documentation
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/python

from PIL import Image, ImageOps

with Image.open("wikipe-tan.png") as im:
    im = ImageOps.grayscale(im)
    im.save("wikipe-tan-grayscale.png", "PNG")
    im = ImageOps.autocontrast(im, cutoff=1, preserve_tone=True)
    im = Image.eval(im, lambda a: ((a / 255.) ** (1 / 0.75)) * 255)
    im.save("wikipe-tan-want.png", "PNG")