I tried using the PIL library to get a matrix consisting of arrays of pixels and RGB, however, I only get a one-dimensional array and I don’t understand how to form a matrix of them
img = Image.open("E:\\1f9114.png").convert('RGB')
obj = img.load()
width, height = img.size
for j in range(height):
for i in range(width):
matrix1=[i,j,obj[i,j]]
print(matrix1)
print()
I know that the matrix can turn out huge, and the usual sheet does not cope .I hope somebody will help, as it is important for me.