A document scanning device reads an image on a document while scanning the
image, and generates image data based on the image. The document scanning
device selects and sets a scanning speed in accordance with a transfer
mode used when the document scanning device transfers the image data to
another apparatus. The document scanning device controls the amount of
generated image data by using the set scanning speed to successively read
the image, whereby optimal transfer processing in accordance with the
transfer mode can be performed. By switching a transfer path in
accordance with the type of the read data, i.e., binary data per pixel or
multilevel data per pixel, efficient data transfer can be performed.