title: How are images actually saved with skimage (Python)
body: <p>I am currently applying the <a href="https://github.com/linbojin/Skeletonization-by-Zhang-Suen-Thinning-Algorithm/blob/master/thinning.py" rel="noreferrer">Zhang-Suen thinning algorithm</a> to hone down on some filaments I would like to later track. This requires me to output a grayscale image in order to identify objects using OpenCV.</p>
  
  <pre><code>import matplotlib
  import matplotlib.pyplot as plt
  import skimage.io as io
  "load image data"
  Img_Original =  io.imread( './data/test1.bmp')      # Gray image, rgb images   need pre-conversion
  
  "Convert gray images to binary images using Otsu's method"
  from skimage.filter import threshold_otsu
  Otsu_Threshold = threshold_otsu(Img_Original)   
  BW_Original = Img_Original &lt; Otsu_Threshold    # must set object region as 1, background region as 0 !
  
  #...
  "Apply the algorithm on images"
  BW_Skeleton = zhangSuen(BW_Original)
  # BW_Skeleton = BW_Original
  "Display the results"
  fig, ax = plt.subplots(1, 2)
  ax1, ax2 = ax.ravel()
  ax1.imshow(BW_Original, cmap=plt.cm.gray)
  ax1.set_title('Original binary image')
  ax1.axis('off')
  ax2.imshow(BW_Skeleton, cmap=plt.cm.gray)
  ax2.set_title('Skeleton of the image')
  ax2.axis('off')
  plt.show()
  </code></pre>
  
  <p>The image plotted using matplotlib is exactly what I want (black and white). When I use either skimage or cv2 to write the output image to a file path, I get a similar image in blue and red. My only problem is that I can't convert this blue/red image to grayscale! So in essence, my output image is useless. Forgive me if this is a trivial question, but is there a protocol for writing images to file paths? What should I be looking out for in terms of image types (ie. bytes, colour/grayscale, format) when I use these tools? Thanks in advance!</p>