title: Skimage rgb2gray giving errors, the input array must have size 3 along
body: <p>So basically, I am trying to open a JPG image and for some reason the rgb2gray is giving some errors. I have tried not to use the rgb2gray function and it worked, it displayed the image with a gaussian effect.</p>
  <pre><code>import os  # for changing path, etc
  import imageio  # for reading image files
  import matplotlib.pyplot as plt  # for displaying figure/image data
  import pandas as pd  # for data handling/analysis
  import plotly  # for interactive plots
  import plotly.express as px  # for displaying data on overlay
  import plotly.graph_objects as go  # for interactive plots
  import scipy.stats as ss  # for statistical testing
  import scikit_posthocs as sp  # for posthoc testing
  
  from skimage import measure, morphology
  from skimage.color import rgb2gray
  from skimage.filters import (gaussian, threshold_yen)
  from skimage.measure import regionprops_table
  
  path = 'C:/Users/David/Desktop'
  os.chdir(path)
  image_name = 'Blood.jpg'
  image = imageio.imread(image_name)
  img = rgb2gray(image)
  img = gaussian(img, sigma=1)
  
  plt.imshow(img, cmap='gray')
  plt.show()
  </code></pre>
  <p>Errors</p>
  <pre><code>Traceback (most recent call last):
    File &quot;C:\Users\David\PycharmProjects\tryinngImageProcessing\main.py&quot;, line 20, in &lt;module&gt;
      img = rgb2gray(image)
    File &quot;C:\Users\David\PycharmProjects\AllPackages\lib\site-packages\skimage\_shared\utils.py&quot;, line 338, in fixed_func
      return func(*args, **kwargs)
    File &quot;C:\Users\David\PycharmProjects\AllPackages\lib\site-packages\skimage\color\colorconv.py&quot;, line 875, in rgb2gray
      rgb = _prepare_colorarray(rgb)
    File &quot;C:\Users\David\PycharmProjects\AllPackages\lib\site-packages\skimage\color\colorconv.py&quot;, line 140, in _prepare_colorarray
      raise ValueError(msg)
  ValueError: the input array must have size 3 along `channel_axis`, got (416, 554, 4)
  </code></pre>