pixel-knitter
takes a bitmap and turns it into a knitting pattern.
The output is written to stdout in self-contained html format. It does only one thing; if you need other formats, html can be converted to pretty much everything.
usage: pixel-knitter [-h] [-s {horizontal,vertical}] image
Turn a bitmap (like a PNG image) into a knitting/tricot pattern.
positional arguments:
image The image to get pixels from, - for stdin.
options:
-h, --help show this help message and exit
-s {horizontal,vertical}, --streak-mode {horizontal,vertical}
Whether to label continuous streaks of the same color horizontally or vertically.
pixel-knitter -s vertical image.png > generated.html
pixel-knitter -s vertical image.png | wkhtmltopdf - generated.pdf
pixel-knitter -s vertical image.png | wkhtmltoimage --format png - generated.png
Needs a compatible terminal.
pixel-knitter -s vertical image.png | wkhtmltoimage --format png - - | img2sixel