A digital camera comprises a controller and an image sensor that digitally
captures an image. The camera also includes an orientation sensor, such as
a mercury switch, that that indicates orientation of the image sensor
whenever an image is captured. When capturing an image, the controller is
configured to format the image in a way that it will be correctly oriented
when displayed. In one embodiment, the camera automatically rotates the
digital image to correct for different orientations of the camera.