save image data to files