using image data on the fly