I am trying to make my own dataset of handwritten images to test my hand written digit classifier. so to make it I wrote the images in a paint box and resized the images to 28x28 pixels same as the train test pixels. but when I loaded it to the python the image shape is (28,28,3) I know these are the RGB values. But I don't know how to get rid of them. should I change my image to gray scale to get an image of size (28,28). I don't know what it is called so the question title can be wrong. The code used to upload the image to environment
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
img=mpimg.imread('0.png')
imgplot = plt.imshow(img)
Xts_n=img
can somebody give me a hint on how to get it done.