发布于 2015-09-11 16:18:44 | 175 次阅读 | 评论: 0 | 来源: 网络整理
The ImageTk module contains support to create and modify Tkinter BitmapImage and PhotoImage objects from PIL images.
For examples, see the demo programs in the Scripts directory.
A Tkinter-compatible bitmap image. This can be used everywhere Tkinter expects an image object.
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 color for the non-transparent parts. See the Tkinter documentation for information on how to specify colours.
参数: | image – A PIL image. |
---|
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.
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.
参数: |
|
---|
Paste a PIL image into the photo image. Note that this can be very slow if the photo image is displayed.
参数: |
|
---|