mdata_value = json_object_object_get(metadata, "ImageSize");
mdata.size = json_object_get_int(mdata_value);
mdata_value = NULL;
- mdata.format = 1;
- mdata.is_last = 0;
+ json_object_put(metadata);
+ metadata = NULL;
+ metadata = json_object_object_get(config, "ColorMode");
+ const char* color_value = json_object_get_string(metadata);
+ if (strcmp(color_value, "Color") == 0)
+ mdata.format = 1;
+
+ if (strcmp(color_value, "Gray") == 0)
+ mdata.format = 0;
+ if (strcmp(color_value, "BW") == 0)
+ mdata.format = 0;
+
+ mdata_value = NULL;
json_object_put(metadata);
+ metadata = NULL;
kds_s2000w_client_response_free(resp);
resp = NULL;
}
\ No newline at end of file
parameter->last_frame = SANE_TRUE;
parameter->bytes_per_line = 0;
parameter->pixels_per_line = 0;
- parameter->lines = 1;
+ parameter->lines = 0;
parameter->depth = 0;
params = parameter;
SANE_Status _sane_kds_s2000w_net_get_select_fd(SANE_Handle handle, SANE_Int* fd)
{
- return SANE_STATUS_GOOD;
+ return SANE_STATUS_UNSUPPORTED;
}
SANE_String_Const _sane_kds_s2000w_net_strstatus(SANE_Status status)