The PIL.ImageWin Module

Dib(image, size=None) (class) [#]

Create a Windows bitmap with the given mode and size.

For more information about this class, see The Dib Class.

HDC(dc) (class) [#]

The ImageWin module contains support to create and display images under Windows 95/98, NT, 2000 and later.

For more information about this class, see The HDC Class.

ImageWindow(image, title="PIL") (class) [#]

Create an image window which displays the given image.

For more information about this class, see The ImageWindow Class.

Window(title="PIL", width=None, height=None) (class) [#]

Create a Window with the given title size.

For more information about this class, see The Window Class.

The Dib Class

Dib(image, size=None) (class) [#]

Create a Windows bitmap with the given mode and size. The mode can be one of "1", "L", "P", or "RGB". If the display requires a palette, this constructor creates a suitable palette and associates it with the image. For an "L" image, 128 greylevels are allocated. For an "RGB" image, a 6x6x6 colour cube is used, together with 20 greylevels. To make sure that palettes work properly under Windows, you must call the palette method upon certain events from Windows.

__init__(image, size=None) [#]
image
size

expose(handle) [#]
handle
Device context (HDC), cast to a Python integer, or a HDC or HWND instance. In PythonWin, you can use the GetHandleAttrib method of the CDC class to get a suitable handle.

fromstring(buffer) [#]
buffer
A string buffer containing display data (usually data returned from tostring)

paste(im, box=None) [#]
im
box

query_palette(handle) [#]

Installs the palette associated with the image in the given device context.

This method should be called upon QUERYNEWPALETTE and PALETTECHANGED events from Windows. If this method returns a non-zero value, one or more display palette entries were changed, and the image should be redrawn.

handle
Returns:

tostring() [#]
Returns:

The HDC Class

HDC(dc) (class) [#]

The ImageWin module contains support to create and display images under Windows 95/98, NT, 2000 and later.

The ImageWindow Class

ImageWindow(image, title="PIL") (class) [#]

The Window Class

Window(title="PIL", width=None, height=None) (class) [#]