An image data processing apparatus capable of automatically giving a
proper file name based on the similarity of image data is provided. An
MFP includes a scanner or communication port that inputs image data, a
memory portion having stored thereon comparison data containing a
fixed-form format portion (print data or fixed-form format data),
together with a file name corresponding to the comparison data, and a CPU
that compares a portion equivalent to a fixed-form format portion of
comparison data that is contained in image data input by the scanner or
the communication port, with a fixed-form format portion of comparison
data stored in the memory portion. When the CPU compares image data with
comparison data to determine that both data are similar to each other,
the CPU sets the file name of the comparison data as the file name of the
image data.