A computer program stored in a recording medium in an imaging device, the computer program when executed performing steps of:
- generating successively image data containing a still image by inputting successively an image signal in an electrical form corresponding to one still image unit, the image signal converted from input image-bearing light;
- storing, on a predetermined memory, the generated image data, the image data acquired in retrospect within a unit time before a current time point;
- recording, on a recording medium, the image data prior to a shutter release operation and the image data subsequent to the shutter release operation, the shutter release operation being performed to acquire the image data in response to an operation timing and to store the acquired image data onto the recording medium, the image data prior to the shutter release operation being stored at the timing of the shutter release operation, and the image data subsequent to the shutter release operation being generated during a predetermined period of time extending from the timing of the shutter release operation to a later time point;
- storing setting information relating to the pixel count modified in response to a modification operation of the pixel count of the image data performed on one of the image data prior to the shutter release operation and the image data subsequent to the shutter release operation, the image data containing a two-dimensional set of pixels;
- and
- controlling setting of the pixel count so that the pixel count of one of the image data prior to the shutter release operation and the image data subsequent to the shutter release operation, modified in the modification operation, reaches the pixel count specified in the setting information and so that the pixel count of the other of the image data prior to the shutter release operation and the image data subsequent to the shutter release operation, unmodified in the modification operation, reaches a predetermined pixel count set as a standard value,
- wherein the modification operation modifies a pixel count of the image data prior to the shutter release operation, and wherein if the pixel count specified in the modification operation is different from the pixel count of the image data subsequent to the shutter release operation, the controlling setting of the pixel count is performed so that the pixel count of the image data prior to the shutter release operation reaches the pixel count set by the modification operation and so that the pixel count of the image data subsequent to the shutter release operation reaches the predetermined pixel count set as the standard value, and wherein the controlling setting of the pixel count is performed so that each of the image data prior to the shutter release operation and the image data subsequent to the shutter release operation reaches the predetermined pixel count set as the standard value if the pixel count set in the modification operation is the same as the pixel count of an index data subsequent to the shutter release operation.