A digital camera, having a function for optically compensating for camera
shake, comprises: a movement detector that detects a movement of the
digital camera; a movement prediction unit that employs the movement
detected by the movement detector to predict a movement of the digital
camera after a predetermined period of time has elapsed; an optical
system moving unit that moves an optical system of the digital camera so
as to compensate for the movement of the digital camera predicted by the
movement prediction unit; and an image data correction unit that corrects
image data obtained while taking a photograph, based on a difference
between an actual movement of the digital camera, which is detected by
the movement detector while taking the photograph, and the movement of
the digital camera that is predicted, by the movement prediction unit, to
occur while taking the photograph, so that the image data will be the
same as image data that are obtained when the optical system is moved
while taking the photograph in order to compensate for the movement of
the digital camera that is detected by the movement detector while
actually taking the photograph.