In order to extract the curves program creates Auto Levels – the image-sample is stretched to the full range of highlights and shadows and then discolored. It is conventionally considered to be “the reference picture without edition”. Then program calculates the curves which return this stretched discolored image to the original position (of course there won't be a variety of colors, and the color will depend only on the brightness). Thus, we get the curves which are used for the edited image.