See https://github.com/ryanuo.screenshot for details.