1
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
4
<meta http-equiv='Content-Type' content='text/html; charset=us-ascii' />
5
<title>The PIL.ImageWin Module</title>
6
<link rel='stylesheet' href='effbot.css' type='text/css' />
9
<h1>The PIL.ImageWin Module</h1>
11
<dt><b>Dib(image, size=None)</b> (class) [<a href='#PIL.ImageWin.Dib-class'>#</a>]</dt>
13
<p>Create a Windows bitmap with the given mode and size.</p>
14
<p>For more information about this class, see <a href='#PIL.ImageWin.Dib-class'><i>The Dib Class</i></a>.</p>
16
<dt><b>HDC(dc)</b> (class) [<a href='#PIL.ImageWin.HDC-class'>#</a>]</dt>
18
<p>The ImageWin module contains support to create and display
19
images under Windows 95/98, NT, 2000 and later.</p>
20
<p>For more information about this class, see <a href='#PIL.ImageWin.HDC-class'><i>The HDC Class</i></a>.</p>
22
<dt><b>ImageWindow(image, title="PIL")</b> (class) [<a href='#PIL.ImageWin.ImageWindow-class'>#</a>]</dt>
24
<p>Create an image window which displays the given image.</p>
25
<p>For more information about this class, see <a href='#PIL.ImageWin.ImageWindow-class'><i>The ImageWindow Class</i></a>.</p>
27
<dt><b>Window(title="PIL", width=None, height=None)</b> (class) [<a href='#PIL.ImageWin.Window-class'>#</a>]</dt>
29
<p>Create a Window with the given title size.</p>
30
<p>For more information about this class, see <a href='#PIL.ImageWin.Window-class'><i>The Window Class</i></a>.</p>
33
<h2><a id='PIL.ImageWin.Dib-class' name='PIL.ImageWin.Dib-class'>The Dib Class</a></h2>
35
<dt><b>Dib(image, size=None)</b> (class) [<a href='#PIL.ImageWin.Dib-class'>#</a>]</dt>
37
<p>Create a Windows bitmap with the given mode and size. The mode can
38
be one of "1", "L", "P", or "RGB".
40
If the display requires a palette, this constructor creates a
41
suitable palette and associates it with the image. For an "L" image,
42
128 greylevels are allocated. For an "RGB" image, a 6x6x6 colour
43
cube is used, together with 20 greylevels.
45
To make sure that palettes work properly under Windows, you must
46
call the <b>palette</b> method upon certain events from Windows.
48
<dt><a id='PIL.ImageWin.Dib.__init__-method' name='PIL.ImageWin.Dib.__init__-method'><b>__init__(image, size=None)</b></a> [<a href='#PIL.ImageWin.Dib.__init__-method'>#</a>]</dt>
50
<p>Create Windows bitmap.</p>
54
Either a PIL image, or a mode string. If a
55
mode string is used, a size must also be given. The
56
mode can be one of "1", "L", "P", or "RGB".</dd>
59
If the first argument is a mode string, this
60
defines the size of the image.</dd>
63
<dt><a id='PIL.ImageWin.Dib.expose-method' name='PIL.ImageWin.Dib.expose-method'><b>expose(handle)</b></a> [<a href='#PIL.ImageWin.Dib.expose-method'>#</a>]</dt>
65
<p>Copy the bitmap contents to a device context.</p>
67
<dt><i>handle</i></dt>
69
Device context (HDC), cast to a Python integer,
70
or a HDC or HWND instance. In PythonWin, you can use the
71
<b>GetHandleAttrib</b> method of the <b>CDC</b> class to get
76
<dt><a id='PIL.ImageWin.Dib.fromstring-method' name='PIL.ImageWin.Dib.fromstring-method'><b>fromstring(buffer)</b></a> [<a href='#PIL.ImageWin.Dib.fromstring-method'>#</a>]</dt>
78
<p>Load display memory contents from string buffer.</p>
80
<dt><i>buffer</i></dt>
82
A string buffer containing display data (usually
83
data returned from <b>tostring</b>)
87
<dt><a id='PIL.ImageWin.Dib.paste-method' name='PIL.ImageWin.Dib.paste-method'><b>paste(im, box=None)</b></a> [<a href='#PIL.ImageWin.Dib.paste-method'>#</a>]</dt>
89
<p>Paste a PIL image into the bitmap image.</p>
93
A PIL image. The size must match the target region.
94
If the mode does not match, the image is converted to the
95
mode of the bitmap image.</dd>
98
A 4-tuple defining the left, upper, right, and
99
lower pixel coordinate. If None is given instead of a
100
tuple, all of the image is assumed.</dd>
103
<dt><a id='PIL.ImageWin.Dib.query_palette-method' name='PIL.ImageWin.Dib.query_palette-method'><b>query_palette(dc)</b></a> [<a href='#PIL.ImageWin.Dib.query_palette-method'>#</a>]</dt>
105
<p>Installs the palette associated with the image in the
106
given device context.
108
This method should be called upon <b>QUERYNEWPALETTE</b>
109
and <b>PALETTECHANGED</b> events from Windows. If this
110
method returns a non-zero value, one or more display
111
palette entries were changed, and the image should be
117
Device context (HDC), cast to a Python integer,
118
or an HDC or HWND instance.</dd>
121
A true value if one or more entries were changed
122
(this indicates that the image should be redrawn).</dd>
125
<dt><a id='PIL.ImageWin.Dib.tostring-method' name='PIL.ImageWin.Dib.tostring-method'><b>tostring()</b></a> [<a href='#PIL.ImageWin.Dib.tostring-method'>#</a>]</dt>
127
<p>Copy display memory contents to string buffer.</p>
131
A string buffer containing display data.</dd>
135
<h2><a id='PIL.ImageWin.HDC-class' name='PIL.ImageWin.HDC-class'>The HDC Class</a></h2>
137
<dt><b>HDC(dc)</b> (class) [<a href='#PIL.ImageWin.HDC-class'>#</a>]</dt>
139
<p>The <b>ImageWin</b> module contains support to create and display
140
images under Windows 95/98, NT, 2000 and later.
143
<h2><a id='PIL.ImageWin.ImageWindow-class' name='PIL.ImageWin.ImageWindow-class'>The ImageWindow Class</a></h2>
145
<dt><b>ImageWindow(image, title="PIL")</b> (class) [<a href='#PIL.ImageWin.ImageWindow-class'>#</a>]</dt>
147
<p>Create an image window which displays the given image.</p>
150
<h2><a id='PIL.ImageWin.Window-class' name='PIL.ImageWin.Window-class'>The Window Class</a></h2>
152
<dt><b>Window(title="PIL", width=None, height=None)</b> (class) [<a href='#PIL.ImageWin.Window-class'>#</a>]</dt>
154
<p>Create a Window with the given title size.</p>
1
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
4
<meta http-equiv='Content-Type' content='text/html; charset=us-ascii' />
5
<title>The PIL.ImageWin Module</title>
6
<link rel='stylesheet' href='effbot.css' type='text/css' />
9
<h1>The PIL.ImageWin Module</h1>
11
<dt><b>Dib(image, size=None)</b> (class) [<a href='#PIL.ImageWin.Dib-class'>#</a>]</dt>
13
<p>Create a Windows bitmap with the given mode and size.</p>
14
<p>For more information about this class, see <a href='#PIL.ImageWin.Dib-class'><i>The Dib Class</i></a>.</p>
16
<dt><b>HDC(dc)</b> (class) [<a href='#PIL.ImageWin.HDC-class'>#</a>]</dt>
18
<p>The ImageWin module contains support to create and display
19
images under Windows 95/98, NT, 2000 and later.</p>
20
<p>For more information about this class, see <a href='#PIL.ImageWin.HDC-class'><i>The HDC Class</i></a>.</p>
22
<dt><b>ImageWindow(image, title="PIL")</b> (class) [<a href='#PIL.ImageWin.ImageWindow-class'>#</a>]</dt>
24
<p>Create an image window which displays the given image.</p>
25
<p>For more information about this class, see <a href='#PIL.ImageWin.ImageWindow-class'><i>The ImageWindow Class</i></a>.</p>
27
<dt><b>Window(title="PIL", width=None, height=None)</b> (class) [<a href='#PIL.ImageWin.Window-class'>#</a>]</dt>
29
<p>Create a Window with the given title size.</p>
30
<p>For more information about this class, see <a href='#PIL.ImageWin.Window-class'><i>The Window Class</i></a>.</p>
33
<h2><a id='PIL.ImageWin.Dib-class' name='PIL.ImageWin.Dib-class'>The Dib Class</a></h2>
35
<dt><b>Dib(image, size=None)</b> (class) [<a href='#PIL.ImageWin.Dib-class'>#</a>]</dt>
37
<p>Create a Windows bitmap with the given mode and size. The mode can
38
be one of "1", "L", "P", or "RGB".
40
If the display requires a palette, this constructor creates a
41
suitable palette and associates it with the image. For an "L" image,
42
128 greylevels are allocated. For an "RGB" image, a 6x6x6 colour
43
cube is used, together with 20 greylevels.
45
To make sure that palettes work properly under Windows, you must
46
call the <b>palette</b> method upon certain events from Windows.
48
<dt><a id='PIL.ImageWin.Dib.__init__-method' name='PIL.ImageWin.Dib.__init__-method'><b>__init__(image, size=None)</b></a> [<a href='#PIL.ImageWin.Dib.__init__-method'>#</a>]</dt>
59
<dt><a id='PIL.ImageWin.Dib.expose-method' name='PIL.ImageWin.Dib.expose-method'><b>expose(handle)</b></a> [<a href='#PIL.ImageWin.Dib.expose-method'>#</a>]</dt>
62
<dt><i>handle</i></dt>
64
Device context (HDC), cast to a Python integer,
65
or a HDC or HWND instance. In PythonWin, you can use the
66
<b>GetHandleAttrib</b> method of the <b>CDC</b> class to get
71
<dt><a id='PIL.ImageWin.Dib.fromstring-method' name='PIL.ImageWin.Dib.fromstring-method'><b>fromstring(buffer)</b></a> [<a href='#PIL.ImageWin.Dib.fromstring-method'>#</a>]</dt>
74
<dt><i>buffer</i></dt>
76
A string buffer containing display data (usually
77
data returned from <b>tostring</b>)
81
<dt><a id='PIL.ImageWin.Dib.paste-method' name='PIL.ImageWin.Dib.paste-method'><b>paste(im, box=None)</b></a> [<a href='#PIL.ImageWin.Dib.paste-method'>#</a>]</dt>
92
<dt><a id='PIL.ImageWin.Dib.query_palette-method' name='PIL.ImageWin.Dib.query_palette-method'><b>query_palette(handle)</b></a> [<a href='#PIL.ImageWin.Dib.query_palette-method'>#</a>]</dt>
94
<p>Installs the palette associated with the image in the
97
This method should be called upon <b>QUERYNEWPALETTE</b>
98
and <b>PALETTECHANGED</b> events from Windows. If this
99
method returns a non-zero value, one or more display
100
palette entries were changed, and the image should be
104
<dt><i>handle</i></dt>
112
<dt><a id='PIL.ImageWin.Dib.tostring-method' name='PIL.ImageWin.Dib.tostring-method'><b>tostring()</b></a> [<a href='#PIL.ImageWin.Dib.tostring-method'>#</a>]</dt>
121
<h2><a id='PIL.ImageWin.HDC-class' name='PIL.ImageWin.HDC-class'>The HDC Class</a></h2>
123
<dt><b>HDC(dc)</b> (class) [<a href='#PIL.ImageWin.HDC-class'>#</a>]</dt>
125
<p>The <b>ImageWin</b> module contains support to create and display
126
images under Windows 95/98, NT, 2000 and later.
129
<h2><a id='PIL.ImageWin.ImageWindow-class' name='PIL.ImageWin.ImageWindow-class'>The ImageWindow Class</a></h2>
131
<dt><b>ImageWindow(image, title="PIL")</b> (class) [<a href='#PIL.ImageWin.ImageWindow-class'>#</a>]</dt>
135
<h2><a id='PIL.ImageWin.Window-class' name='PIL.ImageWin.Window-class'>The Window Class</a></h2>
137
<dt><b>Window(title="PIL", width=None, height=None)</b> (class) [<a href='#PIL.ImageWin.Window-class'>#</a>]</dt>