An imaging apparatus is capable of storing image data in a storage. The imaging apparatus is provided with an image obtaining system that obtains image data, and an image data writing system that stores the image data obtained by the image obtaining system in the storage. The image data writing system stores the image data in a format which is determined in accordance with the number of pages of images represented by the image data.