add: capture image from window
fix a bug