shift to object-oriented

This is the first shift to creating an image data object instead of
using a script. It's not quite working yet because python doesn't copy
objects like I thought... need to work this out.