image_to_knittingpattern Module

This file lets you convert image files to knitting patterns.

knittingpattern.convert.image_to_knittingpattern.convert_image_to_knitting_pattern(path, colors=('white', 'black'))[source]

Load a image file such as a png bitmap of jpeg file and convert it to a knitting pattern file.

Parameters:
  • colors (list) – a list of strings that should be used as colors.
  • path (str) – ignore this. It is fulfilled by the loeder.

Example:

convert_image_to_knitting_pattern().path("image.png").path("image.json")