1. An image processing apparatus comprising: an image input unit for taking image data including a document region as input; a line determination unit for determining, for a side having a tab among sides of said document region, a line extending the boundary of the document region in the tab portion and a line extending the boundary of the document region in the non-tab portion, respectively; a selector for selecting, in accordance with the setting designating the outside or the inside of said document region, one line either in the outside or in the inside from the among lines determined by said line determination unit; and an image cropper for cropping an image of said document region with said selected line as a boundary line.