From: Bastian Dehn Date: Tue, 30 Apr 2024 17:57:54 +0000 (+0200) Subject: change load color and depth X-Git-Tag: v1.0.1^2~2 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=3d4a8b6a4387f0f6b4eb0f04f5dd5435255f7bdb;p=sane-kds-s2000w-net.git change load color and depth --- diff --git a/src/kds_s2000w_handler_opts.c b/src/kds_s2000w_handler_opts.c index e2fdb89..2eb991a 100644 --- a/src/kds_s2000w_handler_opts.c +++ b/src/kds_s2000w_handler_opts.c @@ -223,15 +223,18 @@ void kds_s2000w_handler_set_option(handler* h, int option, void* value, int* inf h->current_metadata->format = 1; h->current_metadata->channels = 3; h->current_metadata->depth = 8; - if (info != NULL) - *info = RELOAD_OPTIONS; + } else if (strcmp(str_Value, "Gray") == 0) { + h->current_metadata->format = 0; + h->current_metadata->channels = 1; + h->current_metadata->depth = 8; } else { h->current_metadata->format = 0; h->current_metadata->channels = 1; + h->current_metadata->depth = 1; } if (info != NULL) - *info |= RELOAD_PARAMS; + *info = RELOAD_PARAMS | RELOAD_OPTIONS; break; case 4: