title: ValueError: Could not find a format to write the specified file in single-image mode
body: <p>I am trying to read an image using skimage package, then crop it and then save it.
  Till cropping it works fine. While saving, it throws the below error</p>
  
  <blockquote>
    <p>ValueError: Could not find a format to write the specified file in
    single-image mode</p>
  </blockquote>
  
  <p>Below is my code. Any help is highly appreciated.
  thanks</p>
  
  <pre><code>import os
  import numpy as np
  import matplotlib.pyplot as plt
  import skimage
  import dataloader
  from utility import To_csv
  path='D:\\beantech_Data\\objtect_detection'
  
  def crop(img):
      return skimage.util.crop(img, ((0,500),(0,0),(0,0)))
  
  images, boxes,  labels = dataloader.train_loader(path)
  
  os.makedirs(os.path.join(path, 'train','cropped'), exist_ok=True)
  
  for i in range(len(images)):
      croped_image = crop(images[i])
      skimage.io.imsave(os.path.join(path, 'train','cropped',f'img{str(i)}'), croped_image)
      box = boxes[i]
      To_csv(box, i,os.path.join(path, 'train','cropped'), Aug= True )
  </code></pre>