the invention relates to the field of image processing and more specifically to image processing in a digital camera for taking panoramic pictures . the digital camera according the invention is adapted to produce an image of a target area when the area is swept by the camera . the camera comprises at least an image sensor comprising several detector lines wherein the image sensor creates picture elements , each of which contains information on one or more detector lines , a control unit that is adapted to control the operation of the camera and to detect the sweeping speed , and a memory for storing picture elements . the camera is adapted to record and store a sequence of picture elements , where the next picture element in the sequence is selected based on sweeping speed , and the camera creates an image from the stored sequence of picture elements .