correct orientation with imagemagick