why is every pixel of an image are equal to 255?

Solution 1:

Actually, they are not. You can see the top and the last few rows only where it shows 255 because the pixels there are white. If you try reading the same array using PIL/OpenCV, the result will show properly.

However, you can see all the results of the NumPy array using this method-

img_sequence = img.getdata()
img_array = np.array(img_sequence)

np.set_printoptions(threshold=np.inf)
print(img_array)

Sample screenshot of a random part of the output I got for the same image -

Output