Method summary
- __del__(self, destroy = _guitest.delete_DibSect)
- __init__(self, *args)
- __repr__(self)
- CopyClient(*args)
- CopyWindow(*args)
- Destroy(*args)
- Invert(*args)
- Load(*args)
- SaveAs(*args)
- ToClipboard(*args)
- ToGrayScale(*args)
Methods
- __del__(self, destroy = _guitest.delete_DibSect)
__del__(self)
- __init__(self, *args)
__init__(self) -> DibSect
- __repr__(self)
- CopyClient(*args)
CopyClient(self, HWND hwnd, int left, int top, int right, int bottom) -> bool
Copy a client area of given window (or possibly its subset) into a given DibSect. The rectangle may be optionally passed as a reference to 4-element array. To get the right result make sure the window you want to copy is not obscured by others.
- CopyWindow(*args)
CopyWindow(self, HWND hwnd) -> bool
Copy the window rectangle.
- Destroy(*args)
Destroy(self) -> bool
Destroys the contents of the DIB section.
- Invert(*args)
Invert(self) -> bool
Invert the colors in a current DIB section.
- Load(*args)
Load(self, char szFile) -> bool
- SaveAs(*args)
SaveAs(self, char szFile) -> bool
Save the current contents of the DIB section in a given file. With 24-bit resolution it can grow quite big, so I immediately convert them to PNG (direct writing of PNG seemed to complicated to implement).
- ToClipboard(*args)
ToClipboard(self) -> bool
Copies the DibSect to clipboard (as an old-fashioned metafile), so that it can be further processed with your favourite image processing software, for example automatically using SendKeys.
- ToGrayScale(*args)
ToGrayScale(self) -> bool
Convert the DibSection to the gray scale. Note that it is still encoded as 24-bit BMP for simplicity.