A non-transitory computer program product, comprising a computer usable medium having a computer readable program code embodied therein, said computer readable program code adapted to be executed to implement a method for controlling a digital photographing apparatus, said method comprising:
- (a) determining a photographing condition;
- and
- (b) adjusting a degree of gamma correction for detecting an auto-focusing value according to the photographing condition,
- wherein the method further comprises if a back light condition is determined in (a), the degree of gamma correction for detecting an auto-focusing value is adjusted as a first degree in (b), and if no back light condition is determined in (a), the degree of gamma correction for detecting an auto-focusing value is adjusted as a second degree in (b),
- wherein the method further comprises, when the degree of gamma correction for detecting an auto-focusing value is adjusted to be the first degree, a luminance of a region of a subject to be auto-focused on is higher than when the degree of gamma correction for detecting an auto-focusing value is adjusted to be the second degree.