I'm working on a Python project where I encrypt and decrypt an image. However, every time I run it, the decrypted image is different from the original although it has the same pixel values.
My code
img = Image.open(path)
pixel_values =np.asarray(img)
img2 = Image.open("decrypted.png")
pixel_values_2 =np.asarray(img2)
print(pixel_values_2==pixel_values)
gives an output of:
[[ True  True  True ...  True  True  True]
 [ True  True  True ...  True  True  True]
 [ True  True  True ...  True  True  True]
 ...
 [ True  True  True ...  True  True  True]
 [ True  True  True ...  True  True  True]
 [ True  True  True ...  True  True  True]]
Does anyone know what I might be missing here or if I haven't considered something?
Original image:

Decrypted image:
