python-halftone
A python module that uses PIL to give images a halftone effect.
It is adapted from this StackOverflow answer (which includes example images) by fraxel.
## Usage
import halftone
h = halftone.Halftone('/path/to/myimage.jpg')
h.make(filename_addition='_halftoned')
Will create a new image at /path/to/myimage_halftoned.jpg
, halftoned with the
default settings.
The full list of options:
filename_addition
: What to add to the filename (before the extension) (default ``).sample
: Sample box size from original image, in pixels (default10
).scale
: Max output dot diameter issample * scale
(which is also the number of possible dot sizes) (default1
).percentage
: How much of the gray component to remove from the CMY channels and put in the K channel (default0
).angles
: A list of 4 angles that each screen channel should be rotated by (default[0,15,30,45,]
).
An example of make()
using all options:
h.make(
filename_addition='_dotty',
sample=5,
scale=1,
percentage=50,
angles[108, 162, 90, 45,]
)
Running it over large images, or with settings that create large images, can take some time.