The canvas doesn’t contain an image. It merely displays one and then immediately forgets what you drew (that’s why you have to draw it all over again when the canvas refreshes). Go back to the original picture to get the pixel color. Assuming you’re not scaling the image when you draw it in the canvas, and assuming you’re drawing it at (0,0):
The explanation was really appreciated “The canvas doesn’t contain an image. It merely displays one and then immediately forgets what you drew (that’s why you have to draw it all over again when the canvas refreshes).”
Just these little explanation goes a very long way, sometimes what is obvious to the experienced is what is unknown to the “novice”.