Jun-01-2021, 10:20 PM
This is from the documentation for PIL ImageTk module.
https://pillow.readthedocs.io/en/stable/...ageTk.html
Notice that im is a PIL image, not an ImageTk.PhotoImage. You need to load your overlay using
https://pillow.readthedocs.io/en/stable/...ageTk.html
Quote:paste(im, box=None)[source]
Paste a PIL image into the photo image. Note that this can be very slow if the photo image is displayed.
Parameters
im – A PIL image. The size must match the target region. If the mode does not match, the image is converted to the mode of the bitmap image.
box – A 4-tuple defining the left, upper, right, and lower pixel coordinate. See Coordinate System. If None is given instead of a tuple, all of the image is assumed.
Notice that im is a PIL image, not an ImageTk.PhotoImage. You need to load your overlay using
Quote:PIL.Image.open(fp, mode='r', formats=None)