~edwin-grubbs/python-imaging/trunk

« back to all changes in this revision

Viewing changes to Docs/pythondoc-PIL.ImageTk.html

  • Committer: effbot
  • Date: 2006-07-05 20:36:11 UTC
  • Revision ID: svn-v4:be285980-f00d-0410-a9fe-d4747b46ecd0:pil:348
Load Imaging-1.1.6b1 into pil.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
2
 
<html>
3
 
<head>
4
 
<meta http-equiv='Content-Type' content='text/html; charset=us-ascii' />
5
 
<title>The PIL.ImageTk Module</title>
6
 
<link rel='stylesheet' href='effbot.css' type='text/css' />
7
 
</head>
8
 
<body>
9
 
<h1>The PIL.ImageTk Module</h1>
10
 
<p>The <b>ImageTk</b> module contains support to create and modify
11
 
Tkinter <b>BitmapImage</b> and <b>PhotoImage</b> objects.
12
 
</p><p>
13
 
For examples, see the demo programs in the <i>Scripts</i>
14
 
directory.
15
 
</p><h2>Module Contents</h2>
16
 
<dl>
17
 
<dt><b>BitmapImage(image=None, **options)</b> (class) [<a href='#PIL.ImageTk.BitmapImage-class'>#</a>]</dt>
18
 
<dd>
19
 
<p>Create a Tkinter-compatible bitmap image.</p>
20
 
<p>For more information about this class, see <a href='#PIL.ImageTk.BitmapImage-class'><i>The BitmapImage Class</i></a>.</p>
21
 
</dd>
22
 
<dt><a id='PIL.ImageTk.getimage-function' name='PIL.ImageTk.getimage-function'><b>getimage(photo)</b></a> [<a href='#PIL.ImageTk.getimage-function'>#</a>]</dt>
23
 
<dd>
24
 
<p>Copies the contents of a PhotoImage to a PIL image memory.</p>
25
 
</dd>
26
 
<dt><b>PhotoImage(image=None, size=None, **options)</b> (class) [<a href='#PIL.ImageTk.PhotoImage-class'>#</a>]</dt>
27
 
<dd>
28
 
<p>Creates a Tkinter-compatible photo image.</p>
29
 
<p>For more information about this class, see <a href='#PIL.ImageTk.PhotoImage-class'><i>The PhotoImage Class</i></a>.</p>
30
 
</dd>
31
 
</dl>
32
 
<h2><a id='PIL.ImageTk.BitmapImage-class' name='PIL.ImageTk.BitmapImage-class'>The BitmapImage Class</a></h2>
33
 
<dl>
34
 
<dt><b>BitmapImage(image=None, **options)</b> (class) [<a href='#PIL.ImageTk.BitmapImage-class'>#</a>]</dt>
35
 
<dd>
36
 
<p>Create a Tkinter-compatible bitmap image.  This can be used
37
 
everywhere Tkinter expects an image object.</p>
38
 
</dd>
39
 
<dt><a id='PIL.ImageTk.BitmapImage.__init__-method' name='PIL.ImageTk.BitmapImage.__init__-method'><b>__init__(image=None, **options)</b></a> [<a href='#PIL.ImageTk.BitmapImage.__init__-method'>#</a>]</dt>
40
 
<dd>
41
 
<p>Create a Tkinter-compatible bitmap image.
42
 
</p><p>
43
 
The given image must have mode "1".  Pixels having value 0 are
44
 
treated as transparent.  Options, if any, are passed on to
45
 
Tkinter.  The most commonly used option is <b>foreground</b>,
46
 
which is used to specify the colour for the non-transparent
47
 
parts.  See the Tkinter documentation for information on how to
48
 
specify colours.
49
 
 
50
 
</p><dl>
51
 
<dt><i>image</i></dt>
52
 
<dd>
53
 
A PIL image.</dd>
54
 
</dl><br />
55
 
</dd>
56
 
<dt><a id='PIL.ImageTk.BitmapImage.__str__-method' name='PIL.ImageTk.BitmapImage.__str__-method'><b>__str__()</b></a> [<a href='#PIL.ImageTk.BitmapImage.__str__-method'>#</a>]</dt>
57
 
<dd>
58
 
<p>Get the Tkinter bitmap image identifier.  This method is
59
 
automatically called by Tkinter whenever a BitmapImage object
60
 
is passed to a Tkinter method.</p>
61
 
<dl>
62
 
<dt>Returns:</dt>
63
 
<dd>
64
 
A Tkinter bitmap image identifier (a string).</dd>
65
 
</dl><br />
66
 
</dd>
67
 
<dt><a id='PIL.ImageTk.BitmapImage.height-method' name='PIL.ImageTk.BitmapImage.height-method'><b>height()</b></a> [<a href='#PIL.ImageTk.BitmapImage.height-method'>#</a>]</dt>
68
 
<dd>
69
 
<p>Get the height of the image.</p>
70
 
<dl>
71
 
<dt>Returns:</dt>
72
 
<dd>
73
 
The height, in pixels.</dd>
74
 
</dl><br />
75
 
</dd>
76
 
<dt><a id='PIL.ImageTk.BitmapImage.width-method' name='PIL.ImageTk.BitmapImage.width-method'><b>width()</b></a> [<a href='#PIL.ImageTk.BitmapImage.width-method'>#</a>]</dt>
77
 
<dd>
78
 
<p>Get the width of the image.</p>
79
 
<dl>
80
 
<dt>Returns:</dt>
81
 
<dd>
82
 
The width, in pixels.</dd>
83
 
</dl><br />
84
 
</dd>
85
 
</dl>
86
 
<h2><a id='PIL.ImageTk.PhotoImage-class' name='PIL.ImageTk.PhotoImage-class'>The PhotoImage Class</a></h2>
87
 
<dl>
88
 
<dt><b>PhotoImage(image=None, size=None, **options)</b> (class) [<a href='#PIL.ImageTk.PhotoImage-class'>#</a>]</dt>
89
 
<dd>
90
 
<p>Creates a Tkinter-compatible photo image.  This can be used
91
 
everywhere Tkinter expects an image object.  If the image is an RGBA
92
 
image, pixels having alpha 0 are treated as transparent.</p>
93
 
</dd>
94
 
<dt><a id='PIL.ImageTk.PhotoImage.__init__-method' name='PIL.ImageTk.PhotoImage.__init__-method'><b>__init__(image=None, size=None, **options)</b></a> [<a href='#PIL.ImageTk.PhotoImage.__init__-method'>#</a>]</dt>
95
 
<dd>
96
 
<p>Create a photo image object. The constructor takes either
97
 
a PIL image, or a mode and a size.  Alternatively, you can
98
 
use the <b>file</b> or <b>data</b> options to initialize
99
 
the photo image object.
100
 
</p><p>
101
 
</p><dl>
102
 
<dt><i>image</i></dt>
103
 
<dd>
104
 
Either a PIL image, or a mode string.  If a
105
 
   mode string is used, a size must also be given.</dd>
106
 
<dt><i>size</i></dt>
107
 
<dd>
108
 
If the first argument is a mode string, this
109
 
   defines the size of the image.</dd>
110
 
<dt><i>file=</i></dt>
111
 
<dd>
112
 
A filename to load the image from (using
113
 
   Image.open(file)).</dd>
114
 
<dt><i>data=</i></dt>
115
 
<dd>
116
 
An 8-bit string containing image data (as
117
 
   loaded from an image file).</dd>
118
 
</dl><br />
119
 
</dd>
120
 
<dt><a id='PIL.ImageTk.PhotoImage.__str__-method' name='PIL.ImageTk.PhotoImage.__str__-method'><b>__str__()</b></a> [<a href='#PIL.ImageTk.PhotoImage.__str__-method'>#</a>]</dt>
121
 
<dd>
122
 
<p>Get the Tkinter photo image identifier.  This method is
123
 
automatically called by Tkinter whenever a PhotoImage object is
124
 
passed to a Tkinter method.</p>
125
 
<dl>
126
 
<dt>Returns:</dt>
127
 
<dd>
128
 
A Tkinter photo image identifier (a string).</dd>
129
 
</dl><br />
130
 
</dd>
131
 
<dt><a id='PIL.ImageTk.PhotoImage.height-method' name='PIL.ImageTk.PhotoImage.height-method'><b>height()</b></a> [<a href='#PIL.ImageTk.PhotoImage.height-method'>#</a>]</dt>
132
 
<dd>
133
 
<p>Get the height of the image.</p>
134
 
<dl>
135
 
<dt>Returns:</dt>
136
 
<dd>
137
 
The height, in pixels.</dd>
138
 
</dl><br />
139
 
</dd>
140
 
<dt><a id='PIL.ImageTk.PhotoImage.paste-method' name='PIL.ImageTk.PhotoImage.paste-method'><b>paste(im, box=None)</b></a> [<a href='#PIL.ImageTk.PhotoImage.paste-method'>#</a>]</dt>
141
 
<dd>
142
 
<p>Paste a PIL image into the photo image.  Note that this can
143
 
be very slow if the photo image is displayed.</p>
144
 
<dl>
145
 
<dt><i>im</i></dt>
146
 
<dd>
147
 
A PIL image.  The size must match the target region.
148
 
   If the mode does not match, the image is converted to the
149
 
   mode of the bitmap image.</dd>
150
 
<dt><i>box</i></dt>
151
 
<dd>
152
 
A 4-tuple defining the left, upper, right, and
153
 
   lower pixel coordinate.  If None is given instead of a
154
 
   tuple, all of the image is assumed.</dd>
155
 
</dl><br />
156
 
</dd>
157
 
<dt><a id='PIL.ImageTk.PhotoImage.width-method' name='PIL.ImageTk.PhotoImage.width-method'><b>width()</b></a> [<a href='#PIL.ImageTk.PhotoImage.width-method'>#</a>]</dt>
158
 
<dd>
159
 
<p>Get the width of the image.</p>
160
 
<dl>
161
 
<dt>Returns:</dt>
162
 
<dd>
163
 
The width, in pixels.</dd>
164
 
</dl><br />
165
 
</dd>
166
 
</dl>
167
 
</body></html>
 
1
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
 
2
<html>
 
3
<head>
 
4
<meta http-equiv='Content-Type' content='text/html; charset=us-ascii' />
 
5
<title>The PIL.ImageTk Module</title>
 
6
<link rel='stylesheet' href='effbot.css' type='text/css' />
 
7
</head>
 
8
<body>
 
9
<h1>The PIL.ImageTk Module</h1>
 
10
<p>The <b>ImageTk</b> module contains support to create and modify
 
11
Tkinter <b>BitmapImage</b> and <b>PhotoImage</b> objects.
 
12
</p><p>
 
13
For examples, see the demo programs in the <i>Scripts</i>
 
14
directory.
 
15
</p><h2>Module Contents</h2>
 
16
<dl>
 
17
<dt><b>BitmapImage(image=None, **options)</b> (class) [<a href='#PIL.ImageTk.BitmapImage-class'>#</a>]</dt>
 
18
<dd>
 
19
<p>Create a Tkinter-compatible bitmap image.</p>
 
20
<p>For more information about this class, see <a href='#PIL.ImageTk.BitmapImage-class'><i>The BitmapImage Class</i></a>.</p>
 
21
</dd>
 
22
<dt><a id='PIL.ImageTk.getimage-function' name='PIL.ImageTk.getimage-function'><b>getimage(photo)</b></a> [<a href='#PIL.ImageTk.getimage-function'>#</a>]</dt>
 
23
<dd>
 
24
</dd>
 
25
<dt><b>PhotoImage(image=None, size=None, **options)</b> (class) [<a href='#PIL.ImageTk.PhotoImage-class'>#</a>]</dt>
 
26
<dd>
 
27
<p>Creates a Tkinter-compatible photo image.</p>
 
28
<p>For more information about this class, see <a href='#PIL.ImageTk.PhotoImage-class'><i>The PhotoImage Class</i></a>.</p>
 
29
</dd>
 
30
</dl>
 
31
<h2><a id='PIL.ImageTk.BitmapImage-class' name='PIL.ImageTk.BitmapImage-class'>The BitmapImage Class</a></h2>
 
32
<dl>
 
33
<dt><b>BitmapImage(image=None, **options)</b> (class) [<a href='#PIL.ImageTk.BitmapImage-class'>#</a>]</dt>
 
34
<dd>
 
35
</dd>
 
36
<dt><a id='PIL.ImageTk.BitmapImage.__init__-method' name='PIL.ImageTk.BitmapImage.__init__-method'><b>__init__(image=None, **options)</b></a> [<a href='#PIL.ImageTk.BitmapImage.__init__-method'>#</a>]</dt>
 
37
<dd>
 
38
<p>Create a Tkinter-compatible bitmap image.
 
39
</p><p>
 
40
The given image must have mode "1".  Pixels having value 0 are
 
41
treated as transparent.  Options, if any, are passed on to
 
42
Tkinter.  The most commonly used option is <b>foreground</b>,
 
43
which is used to specify the colour for the non-transparent
 
44
parts.  See the Tkinter documentation for information on how to
 
45
specify colours.
 
46
 
 
47
</p><dl>
 
48
<dt><i>image</i></dt>
 
49
<dd>
 
50
</dd>
 
51
</dl><br />
 
52
</dd>
 
53
<dt><a id='PIL.ImageTk.BitmapImage.__str__-method' name='PIL.ImageTk.BitmapImage.__str__-method'><b>__str__()</b></a> [<a href='#PIL.ImageTk.BitmapImage.__str__-method'>#</a>]</dt>
 
54
<dd>
 
55
<dl>
 
56
<dt>Returns:</dt>
 
57
<dd>
 
58
</dd>
 
59
</dl><br />
 
60
</dd>
 
61
<dt><a id='PIL.ImageTk.BitmapImage.height-method' name='PIL.ImageTk.BitmapImage.height-method'><b>height()</b></a> [<a href='#PIL.ImageTk.BitmapImage.height-method'>#</a>]</dt>
 
62
<dd>
 
63
<dl>
 
64
<dt>Returns:</dt>
 
65
<dd>
 
66
</dd>
 
67
</dl><br />
 
68
</dd>
 
69
<dt><a id='PIL.ImageTk.BitmapImage.width-method' name='PIL.ImageTk.BitmapImage.width-method'><b>width()</b></a> [<a href='#PIL.ImageTk.BitmapImage.width-method'>#</a>]</dt>
 
70
<dd>
 
71
<dl>
 
72
<dt>Returns:</dt>
 
73
<dd>
 
74
</dd>
 
75
</dl><br />
 
76
</dd>
 
77
</dl>
 
78
<h2><a id='PIL.ImageTk.PhotoImage-class' name='PIL.ImageTk.PhotoImage-class'>The PhotoImage Class</a></h2>
 
79
<dl>
 
80
<dt><b>PhotoImage(image=None, size=None, **options)</b> (class) [<a href='#PIL.ImageTk.PhotoImage-class'>#</a>]</dt>
 
81
<dd>
 
82
</dd>
 
83
<dt><a id='PIL.ImageTk.PhotoImage.__init__-method' name='PIL.ImageTk.PhotoImage.__init__-method'><b>__init__(image=None, size=None, **options)</b></a> [<a href='#PIL.ImageTk.PhotoImage.__init__-method'>#</a>]</dt>
 
84
<dd>
 
85
<p>Create a photo image object. The constructor takes either
 
86
a PIL image, or a mode and a size.  Alternatively, you can
 
87
use the <b>file</b> or <b>data</b> options to initialize
 
88
the photo image object.
 
89
</p><p>
 
90
</p><dl>
 
91
<dt><i>image</i></dt>
 
92
<dd>
 
93
</dd>
 
94
<dt><i>size</i></dt>
 
95
<dd>
 
96
</dd>
 
97
<dt><i>file=</i></dt>
 
98
<dd>
 
99
</dd>
 
100
<dt><i>data=</i></dt>
 
101
<dd>
 
102
</dd>
 
103
</dl><br />
 
104
</dd>
 
105
<dt><a id='PIL.ImageTk.PhotoImage.__str__-method' name='PIL.ImageTk.PhotoImage.__str__-method'><b>__str__()</b></a> [<a href='#PIL.ImageTk.PhotoImage.__str__-method'>#</a>]</dt>
 
106
<dd>
 
107
<dl>
 
108
<dt>Returns:</dt>
 
109
<dd>
 
110
</dd>
 
111
</dl><br />
 
112
</dd>
 
113
<dt><a id='PIL.ImageTk.PhotoImage.height-method' name='PIL.ImageTk.PhotoImage.height-method'><b>height()</b></a> [<a href='#PIL.ImageTk.PhotoImage.height-method'>#</a>]</dt>
 
114
<dd>
 
115
<dl>
 
116
<dt>Returns:</dt>
 
117
<dd>
 
118
</dd>
 
119
</dl><br />
 
120
</dd>
 
121
<dt><a id='PIL.ImageTk.PhotoImage.paste-method' name='PIL.ImageTk.PhotoImage.paste-method'><b>paste(im, box=None)</b></a> [<a href='#PIL.ImageTk.PhotoImage.paste-method'>#</a>]</dt>
 
122
<dd>
 
123
<dl>
 
124
<dt><i>im</i></dt>
 
125
<dd>
 
126
</dd>
 
127
<dt><i>box</i></dt>
 
128
<dd>
 
129
</dd>
 
130
</dl><br />
 
131
</dd>
 
132
<dt><a id='PIL.ImageTk.PhotoImage.width-method' name='PIL.ImageTk.PhotoImage.width-method'><b>width()</b></a> [<a href='#PIL.ImageTk.PhotoImage.width-method'>#</a>]</dt>
 
133
<dd>
 
134
<dl>
 
135
<dt>Returns:</dt>
 
136
<dd>
 
137
</dd>
 
138
</dl><br />
 
139
</dd>
 
140
</dl>
 
141
</body></html>