From 2595588750438ceba5fa28345e8562769267c91a Mon Sep 17 00:00:00 2001 From: 13038267101 Date: Fri, 24 Feb 2023 17:44:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E6=97=B6=E5=8A=A0=E4=B8=8A=E4=B8=80?= =?UTF-8?q?=E6=AE=B5=E5=BB=B6=E6=97=B6=E6=9D=A5=E5=A4=84=E7=90=86=EF=BC=8C?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E6=9C=AA=E5=87=86=E5=A4=87=E5=A5=BD=EF=BC=8C?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=89=B2=E5=81=8F=E6=A0=A1=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- device/scanner.vcxproj | 2 ++ device/scanner.vcxproj.filters | 6 ++++++ sane/s2t_api.h | 2 ++ sane/scanner.cpp | 6 ++++++ sane/scanner.h | 2 ++ twain/twain/huagaods.cpp | 4 ++++ 6 files changed, 22 insertions(+) diff --git a/device/scanner.vcxproj b/device/scanner.vcxproj index eee4603..04dee21 100644 --- a/device/scanner.vcxproj +++ b/device/scanner.vcxproj @@ -220,6 +220,7 @@ + @@ -294,6 +295,7 @@ + diff --git a/device/scanner.vcxproj.filters b/device/scanner.vcxproj.filters index 922d897..cf09390 100644 --- a/device/scanner.vcxproj.filters +++ b/device/scanner.vcxproj.filters @@ -210,6 +210,9 @@ image + + image + @@ -443,6 +446,9 @@ image + + image + diff --git a/sane/s2t_api.h b/sane/s2t_api.h index 7975835..8ee7545 100644 --- a/sane/s2t_api.h +++ b/sane/s2t_api.h @@ -176,6 +176,8 @@ struct __declspec(novtable) ISaneInvoker : public IRef COM_API_DECLARE(void, free_buffer(void* buf, int len)); // SANE options ID ... + SANE_OPTION_ID_API(color_correction); // 2023-02-24 15:31:19 色偏校正 + SANE_OPTION_ID_API(fold_type); // 2023-02-24 15:28:47 对折模式 SANE_OPTION_ID_API(is_multiout); // 多流输出 SANE_OPTION_ID_API(multiout_type); // 多流输出类型 SANE_OPTION_ID_API(color_mode); // 颜色模式 diff --git a/sane/scanner.cpp b/sane/scanner.cpp index e3bcd40..8361cab 100644 --- a/sane/scanner.cpp +++ b/sane/scanner.cpp @@ -196,6 +196,8 @@ namespace callback , {SANE_STD_OPT_NAME_IS_AUTO_FEED_STRENGTH , OPTION_TITLE_ZDFZQD} , {SANE_STD_OPT_NAME_FEED_STRENGTH_VALUE , OPTION_TITLE_JZSBL} , {SANE_STD_OPT_NAME_WAIT_TO_SCAN , OPTION_TITLE_DZSM} + , {SANE_STD_OPT_NAME_FOLD_TYPE , OPTION_TITLE_DZMS} + , {SANE_STD_OPT_NAME_COLOR_CORRECTION , OPTION_TITLE_SPJZ} }, g_discard[] = { {SANE_STD_OPT_NAME_REVERSE_01 , "\351\273\221\347\231\275\345\233\276\345\203\217\345\217\215\350\211\262\350\276\223\345\207\272\357\274\210\346\255\243\345\270\270\351\242\234\350\211\262\344\270\272\357\274\2320-\351\273\221\350\211\262\357\274\2331-\347\231\275\350\211\262\357\274\211"} // 黑白图像反色输出(正常颜色为:0-黑色;1-白色) , {SANE_STD_OPT_NAME_FILTER , "\347\201\260\345\272\246\346\210\226\351\273\221\347\231\275\345\233\276\345\203\217 - \351\231\244\350\211\262"} // 灰度或黑白图像 - 除色 @@ -881,6 +883,8 @@ int scanner::init_options_id(void) else SET_OPT_ID(is_erase_hole_b, RID_HOLE_B, extension_none) else SET_OPT_ID(search_hole_range_b, SEARCH_HOLE_RANGE_B, extension_none) else SET_OPT_ID(fold_direction, FOLD_TYPE, extension_none) + else SET_OPT_ID(fold_type, FOLD_TYPE, extension_none) + else SET_OPT_ID(color_correction, COLOR_CORRECTION, extension_none) op_id++; } @@ -2620,6 +2624,8 @@ COM_API_IMPLEMENT(scanner, void, free_buffer(void* buf, int len)) } // SANE options ID ... +SANE_OPTION_ID_IMPLEMENT(color_correction) +SANE_OPTION_ID_IMPLEMENT(fold_type) SANE_OPTION_ID_IMPLEMENT(is_multiout) SANE_OPTION_ID_IMPLEMENT(multiout_type) SANE_OPTION_ID_IMPLEMENT(color_mode) diff --git a/sane/scanner.h b/sane/scanner.h index 515fc3e..d38e60b 100644 --- a/sane/scanner.h +++ b/sane/scanner.h @@ -206,6 +206,8 @@ public: COM_API_OVERRIDE(void, free_buffer(void* buf, int len)); // SANE options ID ... + SANE_OPTION_ID(color_correction); // 2023-02-24 15:31:19 色偏校正 + SANE_OPTION_ID(fold_type); // 2023-02-24 15:28:46 对折模式 SANE_OPTION_ID(is_multiout); SANE_OPTION_ID(multiout_type); SANE_OPTION_ID(color_mode); diff --git a/twain/twain/huagaods.cpp b/twain/twain/huagaods.cpp index 1346049..6c40107 100644 --- a/twain/twain/huagaods.cpp +++ b/twain/twain/huagaods.cpp @@ -140,6 +140,8 @@ enum CapTypeEx : unsigned short { CAP_EX_SANE_is_erase_hole_b, CAP_EX_SANE_search_hole_range_b, CAP_EX_SANE_fold_direction, + CAP_EX_SANE_fold_type, + CAP_EX_SANE_color_correction, // 2023-02-24 15:31:19 ɫƫУ // 2023-02-24 15:28:46 ģʽ // END for SANE豸ԭʼ͸ ///////////////////////////////////////////////////////////////////////// }; @@ -3066,6 +3068,8 @@ void huagao_ds::init_support_caps_ex(void) ADD_SANE_CAP(is_erase_hole_b); // Ƴ - ADD_SANE_CAP(search_hole_range_b); // Χ - ADD_SANE_CAP(fold_direction); // ۷ + ADD_SANE_CAP(fold_type); + ADD_SANE_CAP(color_correction); } std::wstring huagao_ds::get_config_file(void) {