Encapsulating image specs for multithread support.

The area and image size are moved into a struct so they can be local to the method instead of the whole shared library... which can get called from multiple threads. This resolves issue #18.