store temp image in a platform independent way
pass in a lambda as a generator which should return a frame as needed