Added support for taking screenshot of a region.