Method and apparatus for determining the orientation of an original image