def screenshot(file='screenshot.png', alpha=True):
""" Saves a screenshot of active 3D canvas.
Parameters
----------
file : str, optional
Filename
alpha : bool, optional
If True, alpha channel will be saved
"""
if alpha:
mode = 'RGBA'
else:
mode = 'RGB'
im = png.from_array(_screenshot(alpha=alpha), mode=mode)
im.save(file)
return
评论列表
文章目录