Convert a picture into a knitting pattern.
kpg http://sourceforge.net/projects/kpg/ is a free program that can create knitting patterns out of pictures. It can either create straight patterns or illusion patterns that only reveal the picture when viewed at an angle.
The knitting patterns are simple rectangles (squares) that use simple stiches, a regular "knit stitch" and optionally a "perl stitch". The patterns can be used to create large blankets or many smaller patch-work squares suitable for making a large knitted piece. Experienced knitters are able to take the simple square knitting patterns and integrate them into more complex pieces such as jumpers/sweaters.
kpg can take any kind of bitmap image and create a knitting pattern. It is recommended that low colour images/pictures be used to ensure the knitting process is as simple as possible. It is possible to use a black and white picture and create a pattern using only one colour and using different stitches for the picture. Examples below.
kpg http://sourceforge.net/projects/kpg/ is the only free open source tool I know of to create knitting patterns. Essentially a png2knitting_pattern converter. In theory the patterns kpg generates could be used for crochet (with minor modification).
Road map ideas include run as cgi and generating intarsia knitting charts (see http://www.sweaterscapes.com/intars.htm and http://en.wikipedia.org/wiki/Intarsia_%28knitting%29).
Screen shot of the wxkpg, the GUI version of kpg.
Current version is 0.6
Downloads are available from sourceforge http://sourceforge.net/project/showfiles.php?group_id=153389
You can check out the latest release in CVS http://kpg.cvs.sourceforge.net/kpg/
http://kpg.sf.net/example.html - example pattern produced with kpg (includes input picture). The picture used was 100 pixels square so this means 100 rows with 100 stitches per row, i.e. 10,000 (ten thousand) stitches total.
http://kpg.sf.net/progress.jpg - photo taken half way through knitting.
http://kpg.sf.net/just_off_the_needles.jpg - photo taken immediately after knitting (before trailing threads are snipped).
The image was created in inkscape as an SVG http://kpg.sf.net/example.svg then exported (as PNG). The GIMP was used to index the image (and remove dithering) then saved as a PNG. kpg was then used to create the pattern, actually wxkpg (an easy to use GUI for kpg) was used to create the pattern). The generated html file was then opened in OpenOffice and printed from there.
If you use kpg I'd love to have a photo of the final item (along with the source image) for this web page. Contact details are here http://sourceforge.net/users/clach04/
Good sources of images are low colour count images like logos and cartoons, for example, http://www.google.com/search?hl=en&q=snoopy&btnG=Google+Search
Example for command line tool to create a mono (this means one colour but with a "bumpy" visible pattern). This option is not yet available in the GUI version.
./kpg.py -m mypicture.png
Example for command line tool to create a smooth colour pattern (that is, no bumps or relief stiches ). This option is not yet available in the GUI version.
kpg.py -s mypicture.png
These requirements are only if you download the source code. Pre-built Windows executables do not have these requirements!
kpg is similar to cross stitch pattern generators:
http://njhurst.com/programming/cross-stitch has tutorial on how to prepare images before using this tool to convert to a knitting pattern. The main process is:
Reduce number of colours, ideally for knitting ONLY use a couple of colours
as more colours makes the knitting process more complex. When reducing the
number of colours try to avoid dithering.
In the GIMP
Save the image as a indexed image. The recommended format is PNG as you can elect to have palettes with "non-standard" colour counts. For example, three which is not a multiple of 2.
Run kpg with the image as input.
Under Windows simply find wxkpg from the Start Menu and click the
"Select Image" button to find the bitmap,
then click the "Create knitting pattern" button.
If using the command line version, simply run with the image as an input command line argument, this will (by default) create a HTML file in the same directory as the image. E.g.
python kpg.py myimage.png
Or under Unix like systems:
The image can be in any (indexed) bitmap format supported by PIL (e.g. png, gif, etc.).
Print out the pattern, it is recommended to open the HTML pattern file in a word processor for printing to ensure that the colour table is printed correctly and to ensure that row instructions do not get broken across pages. I recommend OpenOffice http://www.openoffice.org/
Currently kpg creates patterns where the foreground colour is knitted in a different stitch to the background. Simple two colour pictures could be knitted with just one colour thread and still be visible as a pattern in the final knitted material. Simply ignore references to different colour threads and follow the stitch pattern.
Project Page http://sourceforge.net/projects/kpg/