title: Closing an image opened by Pillow in Window Photo Viewer
body: <p>I'm trying to close each image opened via iteration, within each iteration. </p>
  
  <p>I've referred to this thread below, but the correct answer is not producing the results. </p>
  
  <p><a href="https://stackoverflow.com/questions/31751464/how-do-i-close-an-image-opened-in-pillow">How do I close an image opened in Pillow?</a></p>
  
  <p>My code</p>
  
  <pre><code>for i in Final_Bioteck[:5]:
       with Image.open('{}_screenshot.png'.format(i)) as test_image:
          test_image.show()
          time.sleep(2)
  </code></pre>
  
  <p>I also tried, </p>
  
  <p><code>test_image.close()</code> , but no result. </p>
  
  <p>My loop above is opening 5 Windows Photos Viewer dialogs; I was hoping that through iteration, each window would be closed. </p>
  
  <p>I saw this thread as well, but the answers are pretty outdated, so not sure if there is a more simple way to execute what I desire.
  <a href="https://stackoverflow.com/questions/6725099/how-can-i-close-an-image-shown-to-the-user-with-the-python-imaging-library">How can I close an image shown to the user with the Python Imaging Library?</a></p>
  
  <p>Thank you =)</p>