do not perform histogram matching if the embedded thumbnail is too small
Fixes #4467
This commit is contained in:
parent
95a5f3d662
commit
100da304b8
@ -227,6 +227,13 @@ void RawImageSource::getAutoMatchedToneCurve(const ColorManagementParams &cp, st
|
|||||||
histMatchingCache = outCurve;
|
histMatchingCache = outCurve;
|
||||||
histMatchingParams = cp;
|
histMatchingParams = cp;
|
||||||
return;
|
return;
|
||||||
|
} else if (w * 10 < fw) {
|
||||||
|
if (settings->verbose) {
|
||||||
|
std::cout << "histogram matching: the embedded thumbnail is too small: " << w << "x" << h << std::endl;
|
||||||
|
}
|
||||||
|
histMatchingCache = outCurve;
|
||||||
|
histMatchingParams = cp;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
skip = LIM(skip * fh / h, 6, 10); // adjust the skip factor -- the larger the thumbnail, the less we should skip to get a good match
|
skip = LIM(skip * fh / h, 6, 10); // adjust the skip factor -- the larger the thumbnail, the less we should skip to get a good match
|
||||||
source.reset(thumb->quickProcessImage(neutral, fh / skip, TI_Nearest));
|
source.reset(thumb->quickProcessImage(neutral, fh / skip, TI_Nearest));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user