The ImageTk module contains support to create and modify Tkinter BitmapImage and PhotoImage objects.
For examples, see the demo programs in the Scripts directory.
Create a Tkinter-compatible bitmap image.
For more information about this class, see The BitmapImage Class.
Copies the contents of a PhotoImage to a PIL image memory.
Creates a Tkinter-compatible photo image.
For more information about this class, see The PhotoImage Class.
Create a Tkinter-compatible bitmap image. This can be used everywhere Tkinter expects an image object.
Create a Tkinter-compatible bitmap image.
The given image must have mode "1". Pixels having value 0 are treated as transparent. Options, if any, are passed on to Tkinter. The most commonly used option is foreground, which is used to specify the colour for the non-transparent parts. See the Tkinter documentation for information on how to specify colours.
Get the Tkinter bitmap image identifier. This method is automatically called by Tkinter whenever a BitmapImage object is passed to a Tkinter method.
Get the height of the image.
Get the width of the image.
Creates a Tkinter-compatible photo image. This can be used everywhere Tkinter expects an image object. If the image is an RGBA image, pixels having alpha 0 are treated as transparent.
Create a photo image object. The constructor takes either a PIL image, or a mode and a size. Alternatively, you can use the file or data options to initialize the photo image object.
Get the Tkinter photo image identifier. This method is automatically called by Tkinter whenever a PhotoImage object is passed to a Tkinter method.
Get the height of the image.
Paste a PIL image into the photo image. Note that this can be very slow if the photo image is displayed.
Get the width of the image.