avoid one useless copy if no cropping is required

This commit is contained in:
Alberto Griggio 2018-01-31 17:06:39 +01:00
parent 34bd19f4bf
commit b09aeaa6ae

View File

@ -257,6 +257,7 @@ void RawImageSource::getAutoMatchedToneCurve(std::vector<double> &outCurve)
std::cout << "histogram matching: cropping target to get an aspect ratio of " << round(thumb_ratio * 100)/100.0 << ":1, new size is " << tw << "x" << th << std::endl;
}
if (cx || cy) {
Image8 *tmp = new Image8(tw, th);
#ifdef _OPENMP
#pragma omp parallel for
@ -270,6 +271,7 @@ void RawImageSource::getAutoMatchedToneCurve(std::vector<double> &outCurve)
}
target.reset(tmp);
}
}
if (settings->verbose) {
std::cout << "histogram matching: generated neutral rendering" << std::endl;