My digital camera (a Canon Powershot A550) has the nice feature of saving the orientation of the picture in the EXIF information (it has a sensor to detect this at the time you take a picture). Some software, like Eye Of Gnome seems to automaticaly show the picture in the correct orientation.
gthumb has the option to rotate the images while importing, but it doesn't remove the EXIF information, so EOG rotates them again when displaying :)