]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
add constraint for background smoothing aggressivness
authorBastian Dehn <hhaalo@arcor.de>
Sat, 27 Jan 2024 18:17:00 +0000 (19:17 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Sat, 27 Jan 2024 18:17:00 +0000 (19:17 +0100)
src/kds_s2000w_net.c

index ce0d0b81060ff61072dbf8d625c8c63a21da9687..32fc31bce4c59012b9c725eda66ef063e8a8704b 100644 (file)
@@ -307,9 +307,13 @@ const SANE_Option_Descriptor* _sane_kds_s2000w_net_get_option_descriptor(
                        option_descriptors[option].name = "backgroundsmoothingaggressiveness";
                        option_descriptors[option].title = "backgroundsmoothingaggressiveness";
                        option_descriptors[option].desc = "backgroundsmoothingaggressiveness";
-                       option_descriptors[option].cap = SANE_CAP_SOFT_DETECT;
-                       option_descriptors[option].constraint_type = SANE_CONSTRAINT_NONE;
-                       option_descriptors[option].constraint.string_list = NULL;
+                       option_descriptors[option].cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
+                       option_descriptors[option].constraint_type = SANE_CONSTRAINT_RANGE;
+                       SANE_Range* constraint_background_smoothing_aggressivness = malloc(sizeof(SANE_Range));
+                       constraint_background_smoothing_aggressivness->min = -10;
+                       constraint_background_smoothing_aggressivness->max = 10;
+                       constraint_background_smoothing_aggressivness->quant = 1;
+                       option_descriptors[option].constraint.range = constraint_background_smoothing_aggressivness;
                        break;
                case 19:
                        option_descriptors[option].name = "binarizationmode";