A method of processing a digital image to produce an improved digital
image, includes receiving the digital image captured with a camera;
providing a gravity detection device integral with the camera; using the
gravity detection device to determine the direction of gravity relative
to the coordinate system of the camera at substantially the time the
digital image was captured; determining a transform for modifying the
digital image from the direction of gravity; and applying the transform
to the digital image to produce an improved digital image.