Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ImageTk Paste
#8
This is from the documentation for PIL ImageTk module.

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)
Yoriz likes this post
Reply


Messages In This Thread
ImageTk Paste - by KDog - May-31-2021, 09:47 PM
RE: ImageTk Paste - by bowlofred - May-31-2021, 10:29 PM
RE: ImageTk Paste - by Yoriz - May-31-2021, 10:31 PM
RE: ImageTk Paste - by KDog - Jun-01-2021, 03:07 PM
RE: ImageTk Paste - by Yoriz - Jun-01-2021, 04:40 PM
RE: ImageTk Paste - by KDog - Jun-01-2021, 09:19 PM
RE: ImageTk Paste - by Yoriz - Jun-01-2021, 10:16 PM
RE: ImageTk Paste - by deanhystad - Jun-01-2021, 10:20 PM
RE: ImageTk Paste - by KDog - Jun-02-2021, 11:28 AM
RE: ImageTk Paste - by Yoriz - Jun-02-2021, 11:39 AM
RE: ImageTk Paste - by KDog - Jun-02-2021, 12:54 PM
RE: ImageTk Paste - by deanhystad - Jun-02-2021, 05:06 PM
RE: ImageTk Paste - by KDog - Jun-02-2021, 09:42 PM
RE: ImageTk Paste - by deanhystad - Jun-03-2021, 03:27 AM
RE: ImageTk Paste - by KDog - Jun-27-2021, 11:07 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  What script to paste folders thenewcoder 1 678 Nov-29-2023, 09:40 AM
Last Post: Pedroski55
  PIL ImageTk issue with MATPLOTLIB garynewport 0 1,799 Jan-17-2023, 11:32 AM
Last Post: garynewport
  Please help me [copy and paste file from src to dst] midomarc 2 1,027 Nov-24-2022, 10:13 PM
Last Post: midomarc
  Cut and Paste Oshadha 3 2,449 Jan-20-2021, 04:27 PM
Last Post: spaceraiders
  copy paste file and re-name it asheru93 1 2,386 May-24-2019, 10:43 AM
Last Post: heiner55

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020