Writing 1K images to disk using Task.async_stream

The answer handles that part as well.