ENH add from_image method

Adds a from_image method, and cleans up the example code (to generate the readme image) to use it.

(I haven't tested this...)