_write_string_value(value_object, value);
break;
case 25:
- int default_gamma = 0;
- memcpy(value, &default_gamma, sizeof(int));
+ memcpy(value, &gamma_table[0][0], sizeof(int) * 256);
break;
case 26:
- int default_gamma_r = 0;
- memcpy(value, &default_gamma_r, sizeof(int));
+ memcpy(value, &gamma_table[0][1], sizeof(int) * 256);
break;
case 27:
- int default_gamma_g = 0;
- memcpy(value, &default_gamma_g, sizeof(int));
+ memcpy(value, &gamma_table[0][2], sizeof(int) * 256);
break;
case 28:
- int default_gamma_b = 0;
- memcpy(value, &default_gamma_b, sizeof(int));
+ memcpy(value, &gamma_table[0][3], sizeof(int) * 256);
default:
break;
}
constraint_gamma_range = malloc(sizeof(SANE_Range));
constraint_gamma_range->min = 0;
constraint_gamma_range->max = 255;
- constraint_gamma_range->quant = 1;
+ constraint_gamma_range->quant = 0;
descriptor->cap = SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT;
descriptor->constraint_type = SANE_CONSTRAINT_RANGE;
descriptor->constraint.range = constraint_gamma_range;
- descriptor->size = sizeof(SANE_Int);
+ descriptor->size = sizeof(SANE_Int) * 256;
}
SANE_Option_Descriptor* _kds_s2000w_option_descriptor_gamma_vector_r()
descriptor->cap = SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT;
descriptor->constraint_type = SANE_CONSTRAINT_RANGE;
descriptor->constraint.range = constraint_gamma_range;
- descriptor->size = sizeof(SANE_Int);
+ descriptor->size = sizeof(SANE_Int) * 256;
}
SANE_Option_Descriptor* _kds_s2000w_option_descriptor_gamma_vector_g()
constraint_gamma_range = malloc(sizeof(SANE_Range));
constraint_gamma_range->min = 0;
constraint_gamma_range->max = 255;
- constraint_gamma_range->quant = 1;
+ constraint_gamma_range->quant = 0;
descriptor->cap = SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT;
descriptor->constraint_type = SANE_CONSTRAINT_RANGE;
descriptor->constraint.range = constraint_gamma_range;
- descriptor->size = sizeof(SANE_Int);
+ descriptor->size = sizeof(SANE_Int) * 256;
}
constraint_gamma_range = malloc(sizeof(SANE_Range));
constraint_gamma_range->min = 0;
constraint_gamma_range->max = 255;
- constraint_gamma_range->quant = 1;
- descriptor->cap = SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT;
+ constraint_gamma_range->quant = 0;
+ descriptor->cap = SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT | SANE_CAP_INACTIVE;
descriptor->constraint_type = SANE_CONSTRAINT_RANGE;
descriptor->constraint.range = constraint_gamma_range;
- descriptor->size = sizeof(SANE_Int);
+ descriptor->size = sizeof(SANE_Int) * 256;
}
void kds_s2000w_option_descriptor_init_option_descriptors()