Configurable threshold
This commit is contained in:
@@ -8,7 +8,16 @@ bool OpenGLES = false;
|
||||
void RawImageToHTBITMAP(std::shared_ptr<RawImage> &rawImage, HBITMAP *hbmp, UINT thumbSize)
|
||||
{
|
||||
rawImage->calcStats();
|
||||
if(rawImage->imageStats().m_median[0] < rawImage->norm() * 0.2f)
|
||||
|
||||
DWORD thre = 20;
|
||||
DWORD dataSize = 4;
|
||||
HRESULT hr = HRESULT_FROM_WIN32(RegGetValueW(HKEY_CURRENT_USER, L"SOFTWARE\\nou\\Tenmon\\settings", L"thumbnailstretchthreshold", RRF_RT_DWORD, NULL, &thre, &dataSize));
|
||||
|
||||
float thref = 0.2f;
|
||||
if(hr == S_OK)
|
||||
thref = thre / 100.0f;
|
||||
|
||||
if(rawImage->imageStats().m_median[0] < rawImage->norm() * thref)
|
||||
{
|
||||
//OutputDebugStringA("Stretch image");
|
||||
MTFParam params = rawImage->calcMTFParams();
|
||||
|
||||
Reference in New Issue
Block a user