Added the possibility to keep the original picture orientation