screenBitmap module

Functionality to capture and work with bitmaps of the screen.

class screenBitmap.ScreenBitmap(width, height)

Bases: object

Provides a way to capture a bitmap of any part of the screen. The object caches needed DCs and bitmaps therefore an instance of an object only handles one size of bitmap.

@param width: the width of the resulting bitmap in rgb pixels. @param height: the height of the bitmap in rgb pixels.

captureImage(x, y, w, h)

Captures the part of the screen starting at x,y and extends by w (width) and h (height), and stretches/shrinks it to fit in to the object’s bitmap size.

screenBitmap.rgbPixelBrightness(p)

Converts a RGBQUAD pixel in to one grey-scale brightness value.