恢复亮度和对比度协议,原有处理是正确的

This commit is contained in:
gb 2023-08-25 17:49:16 +08:00
parent c164cedb4d
commit 8862396868
1 changed files with 0 additions and 10 deletions

View File

@ -2660,13 +2660,8 @@ void huagao_ds::init_support_caps(void)
int init = 128, l = 1, u = 255, step = 1, now = 128;
int ret = SCANNER_ERR_OK;
std::vector<int> all;
#ifdef ARMY_SCANNER
float range_l = .0f,
range_h = 100.0f;
#else
float range_l = -1000.0f,
range_h = 1000.0f;
#endif
GET_SANE_OPT_EX(int, scanner_, bright, NULL, &all);
init = all[sane_opts::RANGE_POS_DEFAULT];
now = all[sane_opts::RANGE_POS_CURRENT];
@ -2719,13 +2714,8 @@ void huagao_ds::init_support_caps(void)
l = all[sane_opts::RANGE_POS_LOWER];
u = all[sane_opts::RANGE_POS_UPPER];
step = all[sane_opts::RANGE_POS_STEP];
#ifdef ARMY_SCANNER
float range_l = .0f,
range_h = 100.0f;
#else
float range_l = -1000.0f,
range_h = 1000.0f;
#endif
float sf = trans_range((float)step, (float)l, (float)u, range_l, range_h, true),
nf = trans_range((float)now, (float)l, (float)u, range_l, range_h),
initf = trans_range((float)init, (float)l, (float)u, range_l, range_h);