In a shell-script (bash) I want to process a bunch of photos. A first step is to determine the orientation (portrait or landscape) and to turn the picture to its natural ori