Fixes the cropped image having original rotation

fixes issue #46