title: Saving multiple images with Python
body: <p>For my cancer research I need to turn cancerscans into black and white images, and save them. I've this code, which turns the first file in the folder into a black and white picture, and copies it 49 times with names like result1, result2 , result3 etc. </p>
  
  <pre><code>wd = os.getcwd()
  wd = os.chdir("C:\\Users\\Tije\\Documents\\School\\DeepLearning\\IDC_regular_ps50_idx5\\8863\\test")
  
  for x in range(50):
      for file in os.listdir(wd):
          image_file = Image.open(file)  
          image_file= image_file.convert('1')
          print(image_file)
          image_file.save(f"result{x}.png")
  </code></pre>
  
  <p>I need the code to blackandwhite'n every picture in the folder and not just the first one of course. I can't seem to understand why it does this. </p>
  
  <p>Any help?</p>