]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
change order option descriptors
authorBastian Dehn <hhaalo@arcor.de>
Fri, 26 Sep 2025 06:36:20 +0000 (08:36 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Fri, 26 Sep 2025 06:47:25 +0000 (08:47 +0200)
src/kds_s2000w_option_descriptors.c

index bc7f053187d15459a6a0e805995ac72cc6c287fe..8638040bb1794545d4729f92d3cfb15379d331fd 100644 (file)
 option_descriptor** descriptors = NULL;
 uint8_t max_option_count = 0;
 
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_num_options()
+{
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_num_options");
+
+       SANE_Option_Descriptor descriptor = {
+               SANE_NAME_NUM_OPTIONS,
+               SANE_TITLE_NUM_OPTIONS,
+               SANE_DESC_NUM_OPTIONS,
+               SANE_TYPE_INT,
+               SANE_UNIT_NONE,
+               sizeof(SANE_Int),
+               SANE_CAP_SOFT_DETECT,
+               SANE_CONSTRAINT_NONE
+       };
+
+       return descriptor;
+}
+
+/*******************************************************************************
+* standard group
+*******************************************************************************/
 SANE_Option_Descriptor _kds_s2000w_option_descriptor_standard_group()
 {
        kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_standard_group");
@@ -29,37 +50,51 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_standard_group()
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_geometry_group()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_scan_source()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_scan_area_group");
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_scan_source");
+
+       char** constraint = malloc(sizeof(SANE_String_Const*) * 4);
+       constraint[0] = "DocumentFeeder";
+       constraint[1] = "Automatic";
+       constraint[2] = "Flatbed";
+       constraint[3] = NULL;
 
        SANE_Option_Descriptor descriptor = {
-               SANE_NAME_GEOMETRY,
-               SANE_TITLE_GEOMETRY,
-               SANE_DESC_GEOMETRY,
-               SANE_TYPE_GROUP,
+               SANE_NAME_SCAN_SOURCE,
+               SANE_TITLE_SCAN_SOURCE,
+               SANE_DESC_SCAN_SOURCE,
+               SANE_TYPE_STRING,
                SANE_UNIT_NONE,
-               0,
-               SANE_CAP_SOFT_DETECT,
-               SANE_CONSTRAINT_NONE
+               sizeof(SANE_String_Const*) * 4,
+               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
+               SANE_CONSTRAINT_STRING_LIST,
+               {.string_list = (SANE_String_Const*) constraint}
        };
 
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_num_options()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_mode()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_num_options");
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_mode");
+
+       char** constraint = malloc(sizeof(SANE_String_Const*) * 4);
+       constraint[0] = "Color";
+       constraint[1] = "Gray";
+       constraint[2] = "BW";
+       constraint[3] = NULL;
 
        SANE_Option_Descriptor descriptor = {
-               SANE_NAME_NUM_OPTIONS,
-               SANE_TITLE_NUM_OPTIONS,
-               SANE_DESC_NUM_OPTIONS,
-               SANE_TYPE_INT,
+               SANE_NAME_SCAN_MODE,
+               SANE_TITLE_SCAN_MODE,
+               SANE_DESC_SCAN_MODE,
+               SANE_TYPE_STRING,
                SANE_UNIT_NONE,
-               sizeof(SANE_Int),
-               SANE_CAP_SOFT_DETECT,
-               SANE_CONSTRAINT_NONE
+               sizeof(SANE_String_Const*) * 4,
+               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
+               SANE_CONSTRAINT_STRING_LIST,
+               {.string_list = (SANE_String_Const*) constraint}
        };
 
        return descriptor;
@@ -116,71 +151,69 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_scanside()
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_mode()
+/*******************************************************************************
+* geometry group
+*******************************************************************************/
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_geometry_group()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_mode");
-
-       char** constraint = malloc(sizeof(SANE_String_Const*) * 4);
-       constraint[0] = "Color";
-       constraint[1] = "Gray";
-       constraint[2] = "BW";
-       constraint[3] = NULL;
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_scan_area_group");
 
        SANE_Option_Descriptor descriptor = {
-               SANE_NAME_SCAN_MODE,
-               SANE_TITLE_SCAN_MODE,
-               SANE_DESC_SCAN_MODE,
-               SANE_TYPE_STRING,
+               SANE_NAME_GEOMETRY,
+               SANE_TITLE_GEOMETRY,
+               SANE_DESC_GEOMETRY,
+               SANE_TYPE_GROUP,
                SANE_UNIT_NONE,
-               sizeof(SANE_String_Const*) * 4,
-               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
-               SANE_CONSTRAINT_STRING_LIST,
-               {.string_list = (SANE_String_Const*) constraint}
+               0,
+               SANE_CAP_SOFT_DETECT,
+               SANE_CONSTRAINT_NONE
        };
 
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_skip_blank_pages()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_cropping_mode()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_skip_blank_pages");
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_cropping_mode");
+
+       char** constraint = malloc(sizeof(SANE_String_Const*) * 5);
+       constraint[0] = "AutomaticStraighten";
+       constraint[1] = "Automatic";
+       constraint[2] = "Photograph";
+       constraint[3] = "Manual";
+       constraint[4] = NULL;
 
        SANE_Option_Descriptor descriptor = {
-               "skip-blank-pages",
-               "Blank Blank Pages",
-               "Blank Blank Pages",
-               SANE_TYPE_BOOL,
+               "cropping-mode",
+               "Cropping Mode",
+               "Cropping Mode",
+               SANE_TYPE_STRING,
                SANE_UNIT_NONE,
-               sizeof(SANE_Bool),
-               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
-               SANE_CONSTRAINT_NONE
+               sizeof(SANE_String_Const*) * 5,
+               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
+               SANE_CONSTRAINT_STRING_LIST,
+               {.string_list = (SANE_String_Const*) constraint}
        };
 
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_drop()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_cropping_image()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_drop");
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_cropping_image");
 
-       char** constraint = malloc(sizeof(SANE_String_Const*) * 9);
-       constraint[0] = "None";
-       constraint[1] = "Red";
-       constraint[2] = "Green";
-       constraint[3] = "Blue";
-       constraint[4] = "Orange";
-       constraint[5] = "OrangeAndRed";
-       constraint[6] = "Predominant";
-       constraint[7] = "Multiple";
-       constraint[8] = NULL;
+       char** constraint = malloc(sizeof(SANE_String_Const*) * 3);
+       constraint[0] = "EntireDocument";
+       constraint[1] = "PartialDocument";
+       constraint[2] = NULL;
 
        SANE_Option_Descriptor descriptor = {
-               "color-drop-out",
-               "Color Drop Out",
-               "Color Drop Out",
+               "cropping-image",
+               "Cropping Image",
+               "Cropping Image",
                SANE_TYPE_STRING,
                SANE_UNIT_NONE,
-               sizeof(SANE_String_Const*) * 9,
+               sizeof(SANE_String_Const*) * 3,
                SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
                SANE_CONSTRAINT_STRING_LIST,
                {.string_list = (SANE_String_Const*) constraint}
@@ -189,23 +222,23 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_drop()
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_drop_out_aggressiveness()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_image_offset_x()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_drop_out_aggressiveness");
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_image_offset_x");
 
        SANE_Range* constraint = malloc(sizeof(SANE_Range));
-       constraint->min = -10;
-       constraint->max = 10;
+       constraint->min = 0;
+       constraint->max = 75;
        constraint->quant = 1;
 
        SANE_Option_Descriptor descriptor = {
-               "color-drop-out-aggressiveness",
-               "Color Drop Out Aggressiveness",
-               "Color Drop Out Aggressiveness",
+               "image-offset-x",
+               "Image Offset X",
+               "Image Offset X",
                SANE_TYPE_INT,
                SANE_UNIT_NONE,
                sizeof(SANE_Int),
-               SANE_CAP_SOFT_DETECT,
+               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
                SANE_CONSTRAINT_RANGE,
                {.range = constraint}
        };
@@ -213,74 +246,71 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_drop_out_aggressivene
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_auto_brightness_mode()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_image_offset_y()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_auto_brightness_mode");
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_image_offset_y");
 
-       char** constraint = malloc(sizeof(SANE_String_Const*) * 4);
-       constraint[0] = "None";
-       constraint[1] = "Manual";
-       constraint[2] = "Automatic";
-       constraint[3] = NULL;
+       SANE_Range* constraint = malloc(sizeof(SANE_Range));
+       constraint->min = 0;
+       constraint->max = 390;
+       constraint->quant = 1;
 
        SANE_Option_Descriptor descriptor = {
-               "color-auto-brightness-mode",
-               "Color Auto Brightness Mode",
-               "Color Auto Brightness Mode",
-               SANE_TYPE_STRING,
+               "image-offset-y",
+               "Image Offset Y",
+               "Image Offset Y",
+               SANE_TYPE_INT,
                SANE_UNIT_NONE,
-               sizeof(SANE_String_Const*) * 4,
+               sizeof(SANE_Int),
                SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
-               SANE_CONSTRAINT_STRING_LIST,
-               {.string_list = (SANE_String_Const*) constraint}
+               SANE_CONSTRAINT_RANGE,
+               {.range = constraint}
        };
 
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_balance_mode()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_image_width()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_balance_mode");
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_image_width");
 
-       char** constraint = malloc(sizeof(SANE_String_Const*) * 5);
-       constraint[0] = "None";
-       constraint[1] = "Manual";
-       constraint[2] = "Automatic";
-       constraint[3] = "AutomaticAdvanced";
-       constraint[4] = NULL;
+       SANE_Range* constraint = malloc(sizeof(SANE_Range));
+       constraint->min = 10;
+       constraint->max = 85;
+       constraint->quant = 1;
 
        SANE_Option_Descriptor descriptor = {
-               "color-balance-mode",
-               "Color Balance Mode",
-               "Color Balance Mode",
-               SANE_TYPE_STRING,
+               "image-width",
+               "Image Width",
+               "Image Width",
+               SANE_TYPE_INT,
                SANE_UNIT_NONE,
-               sizeof(SANE_String_Const*) * 5,
+               sizeof(SANE_Int),
                SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
-               SANE_CONSTRAINT_STRING_LIST,
-               {.string_list = (SANE_String_Const*) constraint}
+               SANE_CONSTRAINT_RANGE,
+               {.range = constraint}
        };
 
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_balance_agressiveness()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_image_height()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_balancea_agressiveness");
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_image_height");
 
        SANE_Range* constraint = malloc(sizeof(SANE_Range));
-       constraint->min = -2;
-       constraint->max = 2;
+       constraint->min = 10;
+       constraint->max = 400;
        constraint->quant = 1;
 
        SANE_Option_Descriptor descriptor = {
-               "color-balance-aggressiveness",
-               "Color Balance Aggressiveness",
-               "Color Balance Aggressiveness",
+               "image-height",
+               "Image Height",
+               "Image Height",
                SANE_TYPE_INT,
                SANE_UNIT_NONE,
                sizeof(SANE_Int),
-               SANE_CAP_SOFT_DETECT,
+               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
                SANE_CONSTRAINT_RANGE,
                {.range = constraint}
        };
@@ -288,79 +318,28 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_balance_agressiveness
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_balance_red()
+/*******************************************************************************
+* boldness smoothing group
+*******************************************************************************/
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_boldness_smoothing_group()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_balance_red");
-
-       SANE_Range* constraint = malloc(sizeof(SANE_Range));
-       constraint->min = -50;
-       constraint->max = 50;
-       constraint->quant = 1;
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_advanced_group");
 
        SANE_Option_Descriptor descriptor = {
-               "color-balance-red",
-               "Color Balance Red",
-               "Color Balance Red",
-               SANE_TYPE_INT,
+               "boldness-smoothing",
+               "Boldness / Smoothing Options",
+               "Foreground boldness Options and background smoothing options",
+               SANE_TYPE_GROUP,
                SANE_UNIT_NONE,
-               sizeof(SANE_Int),
+               0,
                SANE_CAP_SOFT_DETECT,
-               SANE_CONSTRAINT_RANGE,
-               {.range = constraint}
+               SANE_CONSTRAINT_NONE
        };
 
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_balance_green()
-{
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_balance_green");
-
-       SANE_Range* constraint = malloc(sizeof(SANE_Range));
-       constraint->min = -50;
-       constraint->max = 50;
-       constraint->quant = 1;
-
-       SANE_Option_Descriptor descriptor = {
-               "color-balance-green",
-               "Color Balance Green",
-               "Color Balance Green",
-               SANE_TYPE_INT,
-               SANE_UNIT_NONE,
-               sizeof(SANE_Int),
-               SANE_CAP_SOFT_DETECT,
-               SANE_CONSTRAINT_RANGE,
-               {.range = constraint}
-       };
-
-       return descriptor;
-}
-
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_balance_blue()
-{
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_balance_blue");
-
-       SANE_Range* constraint = malloc(sizeof(SANE_Range));
-       constraint->min = -50;
-       constraint->max = 50;
-       constraint->quant = 1;
-
-       SANE_Option_Descriptor descriptor = {
-               "color-balance-blue",
-               "Color Balance Blue",
-               "Color Balance Blue",
-               SANE_TYPE_INT,
-               SANE_UNIT_NONE,
-               sizeof(SANE_Int),
-               SANE_CAP_SOFT_DETECT,
-               SANE_CONSTRAINT_RANGE,
-               {.range = constraint}
-       };
-
-       return descriptor;
-}
-
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_foreground_boldness_mode()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_foreground_boldness_mode()
 {
        kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_foreground_boldness_mode");
 
@@ -458,47 +437,49 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_background_smoothing_aggres
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_binarization_contrast()
+/*******************************************************************************
+* boldness color group
+*******************************************************************************/
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_boldness_color_group()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_binarization_contrast");
-
-       SANE_Range* constraint = malloc(sizeof(SANE_Range));
-       constraint->min = -50;
-       constraint->max = 50;
-       constraint->quant = 1;
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_boldness_color_group");
 
        SANE_Option_Descriptor descriptor = {
-               "binarization-contrast",
-               "Binarization Contrast",
-               "Binarization Contrast",
-               SANE_TYPE_INT,
+               "color-options",
+               "Color Options",
+               "Color Options",
+               SANE_TYPE_GROUP,
                SANE_UNIT_NONE,
-               sizeof(SANE_Int),
-               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
-               SANE_CONSTRAINT_RANGE,
-               {.range = constraint}
+               0,
+               SANE_CAP_SOFT_DETECT,
+               SANE_CONSTRAINT_NONE
        };
 
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_scan_source()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_drop()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_scan_source");
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_drop");
 
-       char** constraint = malloc(sizeof(SANE_String_Const*) * 4);
-       constraint[0] = "DocumentFeeder";
-       constraint[1] = "Automatic";
-       constraint[2] = "Flatbed";
-       constraint[3] = NULL;
+       char** constraint = malloc(sizeof(SANE_String_Const*) * 9);
+       constraint[0] = "None";
+       constraint[1] = "Red";
+       constraint[2] = "Green";
+       constraint[3] = "Blue";
+       constraint[4] = "Orange";
+       constraint[5] = "OrangeAndRed";
+       constraint[6] = "Predominant";
+       constraint[7] = "Multiple";
+       constraint[8] = NULL;
 
        SANE_Option_Descriptor descriptor = {
-               SANE_NAME_SCAN_SOURCE,
-               SANE_TITLE_SCAN_SOURCE,
-               SANE_DESC_SCAN_SOURCE,
+               "color-drop-out",
+               "Color Drop Out",
+               "Color Drop Out",
                SANE_TYPE_STRING,
                SANE_UNIT_NONE,
-               sizeof(SANE_String_Const*) * 4,
+               sizeof(SANE_String_Const*) * 9,
                SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
                SANE_CONSTRAINT_STRING_LIST,
                {.string_list = (SANE_String_Const*) constraint}
@@ -507,42 +488,47 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_scan_source()
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_config_reset()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_drop_out_aggressiveness()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_config_reset");
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_drop_out_aggressiveness");
+
+       SANE_Range* constraint = malloc(sizeof(SANE_Range));
+       constraint->min = -10;
+       constraint->max = 10;
+       constraint->quant = 1;
 
        SANE_Option_Descriptor descriptor = {
-               "config-reset",
-               "Reset Config",
-               "Load default configuration from scanner",
-               SANE_TYPE_BUTTON,
+               "color-drop-out-aggressiveness",
+               "Color Drop Out Aggressiveness",
+               "Color Drop Out Aggressiveness",
+               SANE_TYPE_INT,
                SANE_UNIT_NONE,
-               0,
-               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
-               SANE_CONSTRAINT_NONE
+               sizeof(SANE_Int),
+               SANE_CAP_SOFT_DETECT,
+               SANE_CONSTRAINT_RANGE,
+               {.range = constraint}
        };
 
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_sharpen()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_auto_brightness_mode()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_sharpen");
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_auto_brightness_mode");
 
-       char** constraint = malloc(sizeof(SANE_String_Const*) * 5);
+       char** constraint = malloc(sizeof(SANE_String_Const*) * 4);
        constraint[0] = "None";
-       constraint[1] = "Normal";
-       constraint[2] = "High";
-       constraint[3] = "Exaggerated";
-       constraint[4] = NULL;
+       constraint[1] = "Manual";
+       constraint[2] = "Automatic";
+       constraint[3] = NULL;
 
        SANE_Option_Descriptor descriptor = {
-               "color-sharpen",
-               "Color Sharpen",
-               "Color Sharpen",
+               "color-auto-brightness-mode",
+               "Color Auto Brightness Mode",
+               "Color Auto Brightness Mode",
                SANE_TYPE_STRING,
                SANE_UNIT_NONE,
-               sizeof(SANE_String_Const*) * 5,
+               sizeof(SANE_String_Const*) * 4,
                SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
                SANE_CONSTRAINT_STRING_LIST,
                {.string_list = (SANE_String_Const*) constraint}
@@ -551,76 +537,73 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_sharpen()
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_multifeed_sensitivity()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_brightness()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_multifeed_sensitivity");
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_brightness");
 
-       char** constraint = malloc(sizeof(SANE_String_Const*) * 5);
-       constraint[0] = "None";
-       constraint[1] = "Low";
-       constraint[2] = "Medium";
-       constraint[3] = "High";
-       constraint[4] = NULL;
+       SANE_Range* constraint = malloc(sizeof(SANE_Range));
+       constraint->min = -50;
+       constraint->max = 50;
+       constraint->quant = 1;
 
        SANE_Option_Descriptor descriptor = {
-               "multifeed-sensitivity",
-               "Multifeed Sensitivity",
-               "Multifeed Sensitivity",
-               SANE_TYPE_STRING,
+               "color-brightness",
+               "Color Brightness",
+               "Color Brightness",
+               SANE_TYPE_INT,
                SANE_UNIT_NONE,
-               sizeof(SANE_String_Const*) * 5,
-               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
-               SANE_CONSTRAINT_STRING_LIST,
-               {.string_list = (SANE_String_Const*) constraint}
+               sizeof(SANE_Int),
+               SANE_CAP_SOFT_DETECT,
+               SANE_CONSTRAINT_RANGE,
+               {.range = constraint}
        };
 
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_multifeed_response()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_contrast()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_multifeed_response");
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_contrast");
 
-       char** constraint = malloc(sizeof(SANE_String_Const*) * 5);
-       constraint[0] = "Stop";
-       constraint[1] = "StopAndGenerateImage";
-       constraint[2] = NULL;
+       SANE_Range* constraint = malloc(sizeof(SANE_Range));
+       constraint->min = -50;
+       constraint->max = 50;
+       constraint->quant = 1;
 
        SANE_Option_Descriptor descriptor = {
-               "multifeed-response",
-               "Multifeed Response",
-               "Multifeed Response",
-               SANE_TYPE_STRING,
+               "color-contrast",
+               "Color Contrast",
+               "Color Contrast",
+               SANE_TYPE_INT,
                SANE_UNIT_NONE,
-               sizeof(SANE_String_Const*) * 3,
-               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
-               SANE_CONSTRAINT_STRING_LIST,
-               {.string_list = (SANE_String_Const*) constraint}
+               sizeof(SANE_Int),
+               SANE_CAP_SOFT_DETECT,
+               SANE_CONSTRAINT_RANGE,
+               {.range = constraint}
        };
 
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_post_scan_rotation()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_balance_mode()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_post_scan_rotation");
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_balance_mode");
 
-       char** constraint = malloc(sizeof(SANE_String_Const*) * 6);
+       char** constraint = malloc(sizeof(SANE_String_Const*) * 5);
        constraint[0] = "None";
-       constraint[1] = "Automatic";
-       constraint[2] = "Automatic90";
-       constraint[3] = "Automatic180";
-       constraint[4] = "Automatic270";
-       constraint[5] = NULL;
+       constraint[1] = "Manual";
+       constraint[2] = "Automatic";
+       constraint[3] = "AutomaticAdvanced";
+       constraint[4] = NULL;
 
        SANE_Option_Descriptor descriptor = {
-               "post-scan-rotation",
-               "Post Scan Rotation",
-               "Post Scan Rotation",
+               "color-balance-mode",
+               "Color Balance Mode",
+               "Color Balance Mode",
                SANE_TYPE_STRING,
                SANE_UNIT_NONE,
-               sizeof(SANE_String_Const*) * 6,
-               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
+               sizeof(SANE_String_Const*) * 5,
+               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
                SANE_CONSTRAINT_STRING_LIST,
                {.string_list = (SANE_String_Const*) constraint}
        };
@@ -628,127 +611,121 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_post_scan_rotation()
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_edge_fill()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_balance_agressiveness()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_edge_fill");
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_balancea_agressiveness");
 
-       char** constraint = malloc(sizeof(SANE_String_Const*) * 4);
-       constraint[0] = "None";
-       constraint[1] = "Automatic";
-       constraint[2] = "AutomaticIncludeTears";
-       constraint[3] = NULL;
+       SANE_Range* constraint = malloc(sizeof(SANE_Range));
+       constraint->min = -2;
+       constraint->max = 2;
+       constraint->quant = 1;
 
        SANE_Option_Descriptor descriptor = {
-               "edge-fill",
-               "Edge Fill",
-               "Edge Fill",
-               SANE_TYPE_STRING,
+               "color-balance-aggressiveness",
+               "Color Balance Aggressiveness",
+               "Color Balance Aggressiveness",
+               SANE_TYPE_INT,
                SANE_UNIT_NONE,
-               sizeof(SANE_String_Const*) * 4,
-               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
-               SANE_CONSTRAINT_STRING_LIST,
-               {.string_list = (SANE_String_Const*) constraint}
+               sizeof(SANE_Int),
+               SANE_CAP_SOFT_DETECT,
+               SANE_CONSTRAINT_RANGE,
+               {.range = constraint}
        };
 
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_image_border()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_balance_red()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_image_border");
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_balance_red");
 
-       char** constraint = malloc(sizeof(SANE_String_Const*) * 4);
-       constraint[0] = "None";
-       constraint[1] = "Add";
-       constraint[2] = "Remove";
-       constraint[3] = NULL;
+       SANE_Range* constraint = malloc(sizeof(SANE_Range));
+       constraint->min = -50;
+       constraint->max = 50;
+       constraint->quant = 1;
 
        SANE_Option_Descriptor descriptor = {
-               "image-border",
-               "Image Border",
-               "Image Border",
-               SANE_TYPE_STRING,
+               "color-balance-red",
+               "Color Balance Red",
+               "Color Balance Red",
+               SANE_TYPE_INT,
                SANE_UNIT_NONE,
-               sizeof(SANE_String_Const*) * 4,
-               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
-               SANE_CONSTRAINT_STRING_LIST,
-               {.string_list = (SANE_String_Const*) constraint}
+               sizeof(SANE_Int),
+               SANE_CAP_SOFT_DETECT,
+               SANE_CONSTRAINT_RANGE,
+               {.range = constraint}
        };
 
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_transport_handling()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_balance_green()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_transport_handling");
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_balance_green");
 
-       char** constraint = malloc(sizeof(SANE_String_Const*) * 5);
-       constraint[0] = "Normal";
-       constraint[1] = "ImprovedStacking";
-       constraint[2] = "BestStacking";
-       constraint[3] = "Special";
-       constraint[4] = NULL;
+       SANE_Range* constraint = malloc(sizeof(SANE_Range));
+       constraint->min = -50;
+       constraint->max = 50;
+       constraint->quant = 1;
 
        SANE_Option_Descriptor descriptor = {
-               "transport-handling",
-               "Transport Handling",
-               "Transport Handling",
-               SANE_TYPE_STRING,
+               "color-balance-green",
+               "Color Balance Green",
+               "Color Balance Green",
+               SANE_TYPE_INT,
                SANE_UNIT_NONE,
-               sizeof(SANE_String_Const*) * 5,
-               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
-               SANE_CONSTRAINT_STRING_LIST,
-               {.string_list = (SANE_String_Const*) constraint}
+               sizeof(SANE_Int),
+               SANE_CAP_SOFT_DETECT,
+               SANE_CONSTRAINT_RANGE,
+               {.range = constraint}
        };
 
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_jpeg_quality()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_balance_blue()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_jpeg_quality");
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_balance_blue");
 
-       char** constraint = malloc(sizeof(SANE_String_Const*) * 6);
-       constraint[0] = "Draft";
-       constraint[1] = "Good";
-       constraint[2] = "Better";
-       constraint[3] = "Best";
-       constraint[4] = "Superior";
-       constraint[5] = NULL;
+       SANE_Range* constraint = malloc(sizeof(SANE_Range));
+       constraint->min = -50;
+       constraint->max = 50;
+       constraint->quant = 1;
 
        SANE_Option_Descriptor descriptor = {
-               "jpeg-quality",
-               "Jpeg Quality",
-               "Jpeg Quality",
-               SANE_TYPE_STRING,
+               "color-balance-blue",
+               "Color Balance Blue",
+               "Color Balance Blue",
+               SANE_TYPE_INT,
                SANE_UNIT_NONE,
-               sizeof(SANE_String_Const*) * 6,
-               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
-               SANE_CONSTRAINT_STRING_LIST,
-               {.string_list = (SANE_String_Const*) constraint}
+               sizeof(SANE_Int),
+               SANE_CAP_SOFT_DETECT,
+               SANE_CONSTRAINT_RANGE,
+               {.range = constraint}
        };
 
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_document_feeder_timeout_response()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_sharpen()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_document_feeder_timeout_response");
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_sharpen");
 
-       char** constraint = malloc(sizeof(SANE_String_Const*) * 4);
-       constraint[0] = "Stop";
-       constraint[1] = "Pause";
-       constraint[2] = "PauseAndWait";
-       constraint[3] = NULL;
+       char** constraint = malloc(sizeof(SANE_String_Const*) * 5);
+       constraint[0] = "None";
+       constraint[1] = "Normal";
+       constraint[2] = "High";
+       constraint[3] = "Exaggerated";
+       constraint[4] = NULL;
 
        SANE_Option_Descriptor descriptor = {
-               "document-feeder-timeout-response",
-               "Document Feeder Timeout Response",
-               "Document Feeder Timeout Response",
+               "color-sharpen",
+               "Color Sharpen",
+               "Color Sharpen",
                SANE_TYPE_STRING,
                SANE_UNIT_NONE,
-               sizeof(SANE_String_Const*) * 4,
-               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
+               sizeof(SANE_String_Const*) * 5,
+               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
                SANE_CONSTRAINT_STRING_LIST,
                {.string_list = (SANE_String_Const*) constraint}
        };
@@ -756,69 +733,82 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_document_feeder_timeout_res
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_hole_fill()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_binarization_contrast()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_hole_fill");
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_binarization_contrast");
+
+       SANE_Range* constraint = malloc(sizeof(SANE_Range));
+       constraint->min = -50;
+       constraint->max = 50;
+       constraint->quant = 1;
 
        SANE_Option_Descriptor descriptor = {
-               "hole-fill",
-               "Hole Fill",
-               "Hole Fill",
-               SANE_TYPE_BOOL,
+               "binarization-contrast",
+               "Binarization Contrast",
+               "Binarization Contrast",
+               SANE_TYPE_INT,
                SANE_UNIT_NONE,
-               sizeof(SANE_Bool),
-               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
-               SANE_CONSTRAINT_NONE,
+               sizeof(SANE_Int),
+               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
+               SANE_CONSTRAINT_RANGE,
+               {.range = constraint}
        };
 
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_cropping_mode()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_config_reset()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_cropping_mode");
-
-       char** constraint = malloc(sizeof(SANE_String_Const*) * 5);
-       constraint[0] = "AutomaticStraighten";
-       constraint[1] = "Automatic";
-       constraint[2] = "Photograph";
-       constraint[3] = "Manual";
-       constraint[4] = NULL;
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_config_reset");
 
        SANE_Option_Descriptor descriptor = {
-               "cropping-mode",
-               "Cropping Mode",
-               "Cropping Mode",
-               SANE_TYPE_STRING,
+               "config-reset",
+               "Reset Config",
+               "Load default configuration from scanner",
+               SANE_TYPE_BUTTON,
                SANE_UNIT_NONE,
-               sizeof(SANE_String_Const*) * 5,
+               0,
                SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
-               SANE_CONSTRAINT_STRING_LIST,
-               {.string_list = (SANE_String_Const*) constraint}
+               SANE_CONSTRAINT_NONE
        };
 
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_cropping_image()
+/*******************************************************************************
+* image processing group
+*******************************************************************************/
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_image_processing_group()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_cropping_image");
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_image_processing_group");
 
-       char** constraint = malloc(sizeof(SANE_String_Const*) * 3);
-       constraint[0] = "EntireDocument";
-       constraint[1] = "PartialDocument";
-       constraint[2] = NULL;
+       SANE_Option_Descriptor descriptor = {
+               "image-processing-options",
+               "Image Processing Options",
+               "Image Processing Options",
+               SANE_TYPE_GROUP,
+               SANE_UNIT_NONE,
+               0,
+               SANE_CAP_SOFT_DETECT | SANE_CAP_ADVANCED,
+               SANE_CONSTRAINT_NONE
+       };
+
+       return descriptor;
+}
+
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_skip_blank_pages()
+{
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_skip_blank_pages");
 
        SANE_Option_Descriptor descriptor = {
-               "cropping-image",
-               "Cropping Image",
-               "Cropping Image",
-               SANE_TYPE_STRING,
+               "skip-blank-pages",
+               "Blank Blank Pages",
+               "Blank Blank Pages",
+               SANE_TYPE_BOOL,
                SANE_UNIT_NONE,
-               sizeof(SANE_String_Const*) * 3,
-               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
-               SANE_CONSTRAINT_STRING_LIST,
-               {.string_list = (SANE_String_Const*) constraint}
+               sizeof(SANE_Bool),
+               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
+               SANE_CONSTRAINT_NONE
        };
 
        return descriptor;
@@ -848,191 +838,184 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_skip_blank_page_content()
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_brightness()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_hole_fill()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_brightness");
-
-       SANE_Range* constraint = malloc(sizeof(SANE_Range));
-       constraint->min = -50;
-       constraint->max = 50;
-       constraint->quant = 1;
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_hole_fill");
 
        SANE_Option_Descriptor descriptor = {
-               "color-brightness",
-               "Color Brightness",
-               "Color Brightness",
-               SANE_TYPE_INT,
+               "hole-fill",
+               "Hole Fill",
+               "Hole Fill",
+               SANE_TYPE_BOOL,
                SANE_UNIT_NONE,
-               sizeof(SANE_Int),
-               SANE_CAP_SOFT_DETECT,
-               SANE_CONSTRAINT_RANGE,
-               {.range = constraint}
+               sizeof(SANE_Bool),
+               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
+               SANE_CONSTRAINT_NONE,
        };
 
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_max_document_length()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_post_scan_rotation()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_max_document_length");
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_post_scan_rotation");
 
-       SANE_Range* constraint = malloc(sizeof(SANE_Range));
-       constraint->min = 25;
-       constraint->max = 400;
-       constraint->quant = 1;
+       char** constraint = malloc(sizeof(SANE_String_Const*) * 6);
+       constraint[0] = "None";
+       constraint[1] = "Automatic";
+       constraint[2] = "Automatic90";
+       constraint[3] = "Automatic180";
+       constraint[4] = "Automatic270";
+       constraint[5] = NULL;
 
        SANE_Option_Descriptor descriptor = {
-               "max-document-length",
-               "Max Document Length",
-               "Max Document Length",
-               SANE_TYPE_INT,
+               "post-scan-rotation",
+               "Post Scan Rotation",
+               "Post Scan Rotation",
+               SANE_TYPE_STRING,
                SANE_UNIT_NONE,
-               sizeof(SANE_Int),
+               sizeof(SANE_String_Const*) * 6,
                SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
-               SANE_CONSTRAINT_RANGE,
-               {.range = constraint}
+               SANE_CONSTRAINT_STRING_LIST,
+               {.string_list = (SANE_String_Const*) constraint}
        };
 
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_document_feeder_timeout()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_edge_fill()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_document_feeder_timeout");
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_edge_fill");
 
-       SANE_Range* constraint = malloc(sizeof(SANE_Range));
-       constraint->min = 0;
-       constraint->max = 120;
-       constraint->quant = 1;
+       char** constraint = malloc(sizeof(SANE_String_Const*) * 4);
+       constraint[0] = "None";
+       constraint[1] = "Automatic";
+       constraint[2] = "AutomaticIncludeTears";
+       constraint[3] = NULL;
 
        SANE_Option_Descriptor descriptor = {
-               "document-feeder-timeout",
-               "Document Feeder Timeout",
-               "Document Feeder Timeout",
-               SANE_TYPE_INT,
+               "edge-fill",
+               "Edge Fill",
+               "Edge Fill",
+               SANE_TYPE_STRING,
                SANE_UNIT_NONE,
-               sizeof(SANE_Int),
+               sizeof(SANE_String_Const*) * 4,
                SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
-               SANE_CONSTRAINT_RANGE,
-               {.range = constraint}
+               SANE_CONSTRAINT_STRING_LIST,
+               {.string_list = (SANE_String_Const*) constraint}
        };
 
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_contrast()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_image_border()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_contrast");
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_image_border");
 
-       SANE_Range* constraint = malloc(sizeof(SANE_Range));
-       constraint->min = -50;
-       constraint->max = 50;
-       constraint->quant = 1;
+       char** constraint = malloc(sizeof(SANE_String_Const*) * 4);
+       constraint[0] = "None";
+       constraint[1] = "Add";
+       constraint[2] = "Remove";
+       constraint[3] = NULL;
 
        SANE_Option_Descriptor descriptor = {
-               "color-contrast",
-               "Color Contrast",
-               "Color Contrast",
-               SANE_TYPE_INT,
+               "image-border",
+               "Image Border",
+               "Image Border",
+               SANE_TYPE_STRING,
                SANE_UNIT_NONE,
-               sizeof(SANE_Int),
-               SANE_CAP_SOFT_DETECT,
-               SANE_CONSTRAINT_RANGE,
-               {.range = constraint}
+               sizeof(SANE_String_Const*) * 4,
+               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
+               SANE_CONSTRAINT_STRING_LIST,
+               {.string_list = (SANE_String_Const*) constraint}
        };
 
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_image_offset_x()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_jpeg_quality()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_image_offset_x");
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_jpeg_quality");
 
-       SANE_Range* constraint = malloc(sizeof(SANE_Range));
-       constraint->min = 0;
-       constraint->max = 75;
-       constraint->quant = 1;
+       char** constraint = malloc(sizeof(SANE_String_Const*) * 6);
+       constraint[0] = "Draft";
+       constraint[1] = "Good";
+       constraint[2] = "Better";
+       constraint[3] = "Best";
+       constraint[4] = "Superior";
+       constraint[5] = NULL;
 
        SANE_Option_Descriptor descriptor = {
-               "image-offset-x",
-               "Image Offset X",
-               "Image Offset X",
-               SANE_TYPE_INT,
+               "jpeg-quality",
+               "Jpeg Quality",
+               "Jpeg Quality",
+               SANE_TYPE_STRING,
                SANE_UNIT_NONE,
-               sizeof(SANE_Int),
-               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
-               SANE_CONSTRAINT_RANGE,
-               {.range = constraint}
+               sizeof(SANE_String_Const*) * 6,
+               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
+               SANE_CONSTRAINT_STRING_LIST,
+               {.string_list = (SANE_String_Const*) constraint}
        };
 
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_image_offset_y()
+/*******************************************************************************
+* feeder group
+*******************************************************************************/
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_feeder_group()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_image_offset_y");
-
-       SANE_Range* constraint = malloc(sizeof(SANE_Range));
-       constraint->min = 0;
-       constraint->max = 390;
-       constraint->quant = 1;
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_feeder_group");
 
        SANE_Option_Descriptor descriptor = {
-               "image-offset-y",
-               "Image Offset Y",
-               "Image Offset Y",
-               SANE_TYPE_INT,
+               "feeder-options",
+               "Feeder Options",
+               "Feeder Options",
+               SANE_TYPE_GROUP,
                SANE_UNIT_NONE,
-               sizeof(SANE_Int),
-               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
-               SANE_CONSTRAINT_RANGE,
-               {.range = constraint}
+               0,
+               SANE_CAP_SOFT_DETECT | SANE_CAP_ADVANCED,
+               SANE_CONSTRAINT_NONE
        };
 
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_image_width()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_autostart()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_image_width");
-
-       SANE_Range* constraint = malloc(sizeof(SANE_Range));
-       constraint->min = 10;
-       constraint->max = 85;
-       constraint->quant = 1;
+       kds_s2000w_debug_printf(ALL, "_kds_s2000w_option_descriptor_autostart");
 
        SANE_Option_Descriptor descriptor = {
-               "image-width",
-               "Image Width",
-               "Image Width",
-               SANE_TYPE_INT,
+               "autostart",
+               "Autostart",
+               "Autostart",
+               SANE_TYPE_BOOL,
                SANE_UNIT_NONE,
                sizeof(SANE_Int),
-               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
-               SANE_CONSTRAINT_RANGE,
-               {.range = constraint}
+               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
+               SANE_CONSTRAINT_NONE
        };
 
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_image_height()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_max_document_length()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_image_height");
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_max_document_length");
 
        SANE_Range* constraint = malloc(sizeof(SANE_Range));
-       constraint->min = 10;
+       constraint->min = 25;
        constraint->max = 400;
        constraint->quant = 1;
 
        SANE_Option_Descriptor descriptor = {
-               "image-height",
-               "Image Height",
-               "Image Height",
+               "max-document-length",
+               "Max Document Length",
+               "Max Document Length",
                SANE_TYPE_INT,
                SANE_UNIT_NONE,
                sizeof(SANE_Int),
-               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
+               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
                SANE_CONSTRAINT_RANGE,
                {.range = constraint}
        };
@@ -1040,95 +1023,131 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_image_height()
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_autostart()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_transport_handling()
 {
-       kds_s2000w_debug_printf(ALL, "_kds_s2000w_option_descriptor_autostart");
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_transport_handling");
+
+       char** constraint = malloc(sizeof(SANE_String_Const*) * 5);
+       constraint[0] = "Normal";
+       constraint[1] = "ImprovedStacking";
+       constraint[2] = "BestStacking";
+       constraint[3] = "Special";
+       constraint[4] = NULL;
 
        SANE_Option_Descriptor descriptor = {
-               "autostart",
-               "Autostart",
-               "Autostart",
-               SANE_TYPE_BOOL,
+               "transport-handling",
+               "Transport Handling",
+               "Transport Handling",
+               SANE_TYPE_STRING,
                SANE_UNIT_NONE,
-               sizeof(SANE_Int),
+               sizeof(SANE_String_Const*) * 5,
                SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
-               SANE_CONSTRAINT_NONE
+               SANE_CONSTRAINT_STRING_LIST,
+               {.string_list = (SANE_String_Const*) constraint}
        };
 
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_boldness_smoothing_group()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_multifeed_sensitivity()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_advanced_group");
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_multifeed_sensitivity");
+
+       char** constraint = malloc(sizeof(SANE_String_Const*) * 5);
+       constraint[0] = "None";
+       constraint[1] = "Low";
+       constraint[2] = "Medium";
+       constraint[3] = "High";
+       constraint[4] = NULL;
 
        SANE_Option_Descriptor descriptor = {
-               "boldness-smoothing",
-               "Boldness / Smoothing Options",
-               "Foreground boldness Options and background smoothing options",
-               SANE_TYPE_GROUP,
+               "multifeed-sensitivity",
+               "Multifeed Sensitivity",
+               "Multifeed Sensitivity",
+               SANE_TYPE_STRING,
                SANE_UNIT_NONE,
-               0,
-               SANE_CAP_SOFT_DETECT,
-               SANE_CONSTRAINT_NONE
+               sizeof(SANE_String_Const*) * 5,
+               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
+               SANE_CONSTRAINT_STRING_LIST,
+               {.string_list = (SANE_String_Const*) constraint}
        };
 
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_boldness_color_group()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_multifeed_response()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_boldness_color_group");
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_multifeed_response");
+
+       char** constraint = malloc(sizeof(SANE_String_Const*) * 5);
+       constraint[0] = "Stop";
+       constraint[1] = "StopAndGenerateImage";
+       constraint[2] = NULL;
 
        SANE_Option_Descriptor descriptor = {
-               "color-options",
-               "Color Options",
-               "Color Options",
-               SANE_TYPE_GROUP,
+               "multifeed-response",
+               "Multifeed Response",
+               "Multifeed Response",
+               SANE_TYPE_STRING,
                SANE_UNIT_NONE,
-               0,
-               SANE_CAP_SOFT_DETECT,
-               SANE_CONSTRAINT_NONE
+               sizeof(SANE_String_Const*) * 3,
+               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
+               SANE_CONSTRAINT_STRING_LIST,
+               {.string_list = (SANE_String_Const*) constraint}
        };
 
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_image_processing_group()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_document_feeder_timeout()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_image_processing_group");
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_document_feeder_timeout");
+
+       SANE_Range* constraint = malloc(sizeof(SANE_Range));
+       constraint->min = 0;
+       constraint->max = 120;
+       constraint->quant = 1;
 
        SANE_Option_Descriptor descriptor = {
-               "image-processing-options",
-               "Image Processing Options",
-               "Image Processing Options",
-               SANE_TYPE_GROUP,
+               "document-feeder-timeout",
+               "Document Feeder Timeout",
+               "Document Feeder Timeout",
+               SANE_TYPE_INT,
                SANE_UNIT_NONE,
-               0,
-               SANE_CAP_SOFT_DETECT | SANE_CAP_ADVANCED,
-               SANE_CONSTRAINT_NONE
+               sizeof(SANE_Int),
+               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
+               SANE_CONSTRAINT_RANGE,
+               {.range = constraint}
        };
 
        return descriptor;
 }
 
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_feeder_group()
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_document_feeder_timeout_response()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_feeder_group");
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_document_feeder_timeout_response");
+
+       char** constraint = malloc(sizeof(SANE_String_Const*) * 4);
+       constraint[0] = "Stop";
+       constraint[1] = "Pause";
+       constraint[2] = "PauseAndWait";
+       constraint[3] = NULL;
 
        SANE_Option_Descriptor descriptor = {
-               "feeder-options",
-               "Feeder Options",
-               "Feeder Options",
-               SANE_TYPE_GROUP,
+               "document-feeder-timeout-response",
+               "Document Feeder Timeout Response",
+               "Document Feeder Timeout Response",
+               SANE_TYPE_STRING,
                SANE_UNIT_NONE,
-               0,
-               SANE_CAP_SOFT_DETECT | SANE_CAP_ADVANCED,
-               SANE_CONSTRAINT_NONE
+               sizeof(SANE_String_Const*) * 4,
+               SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
+               SANE_CONSTRAINT_STRING_LIST,
+               {.string_list = (SANE_String_Const*) constraint}
        };
 
        return descriptor;
 }
+/******************************************************************************/
 
 void _kds_s2000w_option_descriptors_init_min_profile()
 {