1. A method of adaptive reformatting of digital photos and document images, the method comprising: selecting a rule of calculation of function of value for a pixel depending on results of analyzing an image; generating a map of value and a map of history; changing a size of the image by adding/removing at least one found path by means of interpolation, wherein both of horizontal and vertical paths are used, and the horizontal path is a chain of the connected pixels where an initial pixel of the horizontal path is on the left border of the image, a final pixel of the horizontal path is on the right border of the image, and the quantity of pixels in the horizontal path is equal to the width of the image of pixels, whereas the vertical path is a chain of the connected pixels where an initial pixel of the vertical path is on the top border of the image, a final pixel of the vertical path is on the bottom border of the image, and the quantity of pixels in the vertical path is equal to the height of the image of pixels, and search for the path is executed by means of minimization of a sum of pixel values of the path; and repeating generation of the maps of values and history and change of a size of the image until a demanded size of the image is achieved or the sum of path values exceeds a predetermined threshold.