调整多流输出互斥

This commit is contained in:
mo1027728827@qq.com 2022-05-21 16:56:14 +08:00
parent 6c0f3f467b
commit 724276309e
6 changed files with 45 additions and 43 deletions

View File

@ -24,7 +24,7 @@ hg_scanner::hg_scanner(ScannerSerial serial
, bright_(128), contrast_(4), gamma_(1.0f), threshold_(40), anti_noise_(8), margin_(5)
, fractate_level_(50), ui_ev_cb_(ui_default_callback), scan_life_(NULL)
, notify_setting_result_(false), user_cancel_(false), cb_mem_(true), test_1_paper_(false)
, setting_count_(0),img_type_(""), online_(false),is_quality_(-1),is_color_fill(false)
, setting_count_(0),img_type_(""), online_(false),is_quality_(-1),is_color_fill(false),is_multiout(false)
{
custom_gamma_val_ = new SANE_Gamma;
memset(custom_gamma_val_, 0, sizeof(SANE_Gamma));
@ -258,6 +258,8 @@ void hg_scanner::set_setting_map(int sn, const char* title)
setting_map_[HG_BASE_SETTING_INDEX_COLOR_MODE] = sn;
else if (val == OPTION_TITLE_DLSC)
setting_map_[HG_BASE_SETTING_INDEX_MULTI_OUT] = sn;
else if (val == OPTION_TITLE_DLSCLX)
setting_map_[HG_BASE_SETTING_INDEX_MULTI_OUT_TYPE] = sn;
else if (val == OPTION_TITLE_HDHHBTX_CS)
setting_map_[HG_BASE_SETTING_INDEX_ERASE_COLOR] = sn;
else if (val == OPTION_TITLE_24WCSTX_DLSCCH)
@ -755,6 +757,7 @@ void hg_scanner::working_begin(void*)
void hg_scanner::working_done(void*)
{
imgs_.Clear();
final_imgs_.Clear();
while (paths_.Size())
{
remove(paths_.Take().c_str());
@ -984,6 +987,11 @@ int hg_scanner::setting_color_mode(void* data)
return ret;
}
int hg_scanner::setting_multi_out(void *data)
{
is_multiout = *((bool*)data);
return SCANNER_ERR_OK;
}
int hg_scanner::setting_multi_out_type(void *data)
{
int ret = SCANNER_ERR_OK;
if(image_prc_param_.bits.color_mode != 2)
@ -1934,8 +1942,9 @@ int hg_scanner::set_setting(int setting_no, void* data, int len)
// NOTE: the array of 'func' must be ONE to ONE of the HG_BASE_SETTING_INDEX_xxx
int(hg_scanner:: * func[])(void*) = { &hg_scanner::setting_restore
, &hg_scanner::setting_help
, &hg_scanner::setting_color_mode
, &hg_scanner::setting_multi_out
, &hg_scanner::setting_multi_out_type
, &hg_scanner::setting_color_mode
, &hg_scanner::setting_rid_color
, &hg_scanner::setting_rid_multi_red
, &hg_scanner::setting_rid_answer_red

View File

@ -29,8 +29,9 @@ enum
{
HG_BASE_SETTING_INDEX_RESTORE_DEFAULT_SETTINGS = 0, // 恢复默认设置
HG_BASE_SETTING_INDEX_HELP, // 帮助
HG_BASE_SETTING_INDEX_COLOR_MODE, // 颜色模式
HG_BASE_SETTING_INDEX_MULTI_OUT, // 多流输出
HG_BASE_SETTING_INDEX_MULTI_OUT_TYPE, // 多流输出类型
HG_BASE_SETTING_INDEX_COLOR_MODE, // 颜色模式
HG_BASE_SETTING_INDEX_ERASE_COLOR, // 除色
HG_BASE_SETTING_INDEX_ERASE_MULTI_OUT_RED, // 多流输出除红
HG_BASE_SETTING_INDEX_ERASE_ANSWER_RED, // 答题卡除红
@ -139,6 +140,7 @@ protected:
int setting_color_mode(void* data);
int setting_multi_out(void *data);
int setting_multi_out_type(void *data);
int setting_rid_color(void* data);
int setting_rid_multi_red(void* data);
@ -243,6 +245,7 @@ protected:
bool is_auto_matic_color;// 自动颜色识别
int is_quality_; // 画质设置
bool is_color_fill; // 色彩填充
bool is_multiout; // 多流输出
SCANCONF img_conf_; //此参数外部不做任何改变请在writedown_image_configuration做修改
std::string img_type_;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long