avoid one useless copy if no cropping is required
This commit is contained in:
parent
34bd19f4bf
commit
b09aeaa6ae
@ -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;
|
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);
|
Image8 *tmp = new Image8(tw, th);
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
#pragma omp parallel for
|
#pragma omp parallel for
|
||||||
@ -270,6 +271,7 @@ void RawImageSource::getAutoMatchedToneCurve(std::vector<double> &outCurve)
|
|||||||
}
|
}
|
||||||
target.reset(tmp);
|
target.reset(tmp);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (settings->verbose) {
|
if (settings->verbose) {
|
||||||
std::cout << "histogram matching: generated neutral rendering" << std::endl;
|
std::cout << "histogram matching: generated neutral rendering" << std::endl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user