<vizcapture>.screenBuffer

Capture and return the current screen buffer

 

<vizcapture>.screenBuffer(
    flip = False    # Keyword argument

)

 

flip = False

If True, the returned data will start from the upper left corner of the screen. Otherwise the data will start from the lower left corner.


Remarks

This command will capture the current contents of the screen buffer and return the raw data. The data is returned as a string, where each character represents a single color component of a pixel (i.e. r, g, or b). The color data is in BGR format.

Return Value

(width,height,data)

Example

width,height,data = vizcapture.screenBuffer()
if data:
    #Print width, height, and length of data
    print width,height,len(data)
    #Print BGR color of first pixel
    print ord(data[0]), ord(data[1]), ord(data[2])