1. An image processing apparatus comprising: a region division unit configured to extract an object region from an input image; a filling color generation unit configured to generate a filling color of the object region; a filling unit configured to perform filling processing of the object region of the input image using the generated filling color; a boundary region setting unit configured to set a boundary region at an inner side of a boundary of the object region of the input image; an adjacent pixel value writing unit configured to write a pixel value of an adjacent pixel at an outer side of the boundary of the object region to a corresponding pixel in the boundary region; and an output unit configured to output a document file having a data structure including the input image having the pixel value of the adjacent pixel written to each pixel in the boundary region and having a pixel value of the filling color written to each pixel in a region set at the inner side of the boundary region and an image of the object region.