cleanup
correctly reset context for each image
allocate deque of image buffers to reuse