rotate image, fix bug with camera preview