1. A system of adaptive reformatting of digital photos, which comprises a module to select a rule of calculation of function of value for a pixel, a generator of maps of values and history, a module to analyze the map of values and select a path, a module to add a path to an image, a module to remove a path from an image, a scaling module, a module to weaken the map of history, and a module to update the map of values, wherein an output of the module to select a rule of calculation of function of values for a pixel is connected with an input of the generator of maps of values and history, and also with an input of the module to update the map of values, an output of the generator of maps of values and history is connected with an input of the module to analyze the map of values and select a path, an output of the module to analyze the map of values and select a path is connected with inputs of the module to add a path to the image, of the module to remove a path from the image, and of the scaling module, outputs of the module to add a path to the image and of the module to remove a path from the image are connected with an input of the module to weaken the map of history, an output of the module to weaken the map of history is connected with an input of the module to update the map of values, and an output of the module to update the map of values is connected with an input of the module to analyze the map of values and select a path, wherein the module to select a rule of calculation of function of value for a pixel selects a rule of calculation of function of value for each pixel from a set of predetermined rules depending on information contained in the image, wherein the generator of maps of values and history generates an initial map of values and an initial map of history, using the selected rule, wherein the module to analyze the map of values and select a path determines at least one horizontal path from connected pixels, where an initial pixel of a path is on the left border of the image, a final pixel of the path is on the right border of the image, and the quantity of pixels in the path is equal to the width of the image of pixels, and also determines at least one vertical path from connected pixels, where an initial pixel of a path is on the top border of the image, a final pixel of the path is on the bottom border of the image, and the quantity of pixels in a path is equal to the height of the image of pixels, and if a sum of pixel values of all found paths is greater than or equal to a predetermined threshold, the image is transferred to the scaling module, and if the sum is less than the predetermined value, the image and the maps of values and history are transferred to the module to add a path to the image or the module to remove a path from the image depending on a current and required ratio of the sides of the image, wherein the module to add a path to the image increases the current image by adding the least one found path to the image using interpolation for several nearest pixels, wherein the module to remove a path from the image reduces the current image by removing the least one found path from the image, wherein the module to weaken the map of history reduces the values in the map of history, which correspond to environment of pixels of paths removed or added earlier, wherein the module to update the map of value recalculates a map of values, using the previously selected rule and map of history.