fixed picking of correct resolution and rotation of the preview image