Wednesday, January 16, 2013

A little gimp hack

I know there are at least three knitters who might read this, so I thought I'd get this out here. A few months back I had need of a panda pattern for Team Unity in Nerd Wars. I opted to make up my own and I based it on this image. I used gimp:
  1. started from one photo.
  2. cropped the image to just the panda.
  3. drew lines where the front leg is since it’s all basically black/shadow.
  4. scaled the image to be only 20 pixels wide while shrinking it less vertically for a stitch aspect ratio of 5/7.
  5. played with the posterize function a bit, then canceled it.
  6. got out pencil mode with a one-pixel paintbrush and started picking my colors.
The resulting image looked like:

Tiny panda
I scaled it up (using interpolation mode "none" in gimp) and made these mittens using mostly mom's leftovers:
Mittens!
 I knit them top-down without rotating the pattern... you can see the result.

 Last week I was mulling on the problem of automatically putting black lines around each stitch. I finally got a Python-fu program working within gimp to make:

Printable pattern
I'm happy! Code is at github. This project shows that one nice feature would be to figure out how to make the grid be something other than black. I'm not quite sure how - maybe another day.

By the way, we're home today while someone works on the generator system, making it so we can run the house from a backup generator.

No comments: