Now loads and queries an image.
Hack: added start of perl script to (hopefully) generate most of the methods.