if you mean that you want to figure out which way the image is depending on the actual data in the image, then you'll most likely get to do the image processing yourself, on the other hand, if you are talking jpegs from a relatively new camera then I suppose that you should be able to get that info by looking at the EXIF information. AFAIK you can read exif with PIL, but not write.
-- http://mail.python.org/mailman/listinfo/python-list