For the purpose of demonstrating a handwritten digit recognition system, I want to be able to draw digits with the mouse in a Python 3 application. The drawings must end up as gray scale raster images in a 28-by-28 Numpy array.
Since the digits must resemble the digits from the MNIST dataset and therefore can't be aliased, it's probably best if I can draw with thick strokes on a large canvas, read the image into a Numpy array and then downsample it.
How can I accomplish this?
Edit: Initially, I considered using a Tkinter canvas to do the drawing, but there seems to be no way to get a rasterized version of a Tkinter canvas drawing.