fixed captureView function (added retina scaling)