*use streams to save image files