the following:
image = Image.open(name, 'r')
data = np.array(image.getdata())
data.reshape(image.size)
returns:
Traceback (most recent call last):
File "/home/usr/colorviewer/main.py", line 207, in <module>
print(getPalette())
File "/home/usr/colorviewer/main.py", line 152, in getPalette
data.reshape(image.size)
ValueError: cannot reshape array of size 921600 into shape (640,480)
why does it say the array size is 921600 instead of 307200 as the size would suggest, and how might the image data be reshaped into its normal resolution?