title: How can I draw lines into numpy arrays?
body: <p>I would like to be able to draw lines into numpy arrays to get off-line features for on-line handwriting recognition. This means I don't need the image at all, but I need for some positions in a numpy array who an image of a given size would look like.</p>
  
  <p>I would like to be able to specify an image size and then draw strokes like this:</p>
  
  <pre><code>import module
  im = module.new_image(width=800, height=200)
  im.add_stroke(from={'x': 123, 'y': 2}, to={'x': 42, 'y': 3})
  im.add_stroke(from={'x': 4, 'y': 3}, to={'x': 2, 'y': 1})
  features = im.get(x_min=12, x_max=15, y_min=0, y_max=111)
  </code></pre>
  
  <p>Is something simple like that possible (preferably directly with numpy / scipy)?</p>
  
  <p>(Please note that I want grey-scale interpolation. So <code>features</code> should be a matrix of values in [0, 255].)</p>