kopia lustrzana https://gitlab.com/sane-project/backends
change resolution default for all scanners
- use lowest available y dpi instead of fixed 300 dpi so that preview with scanimage is done at low resolution valuemerge-requests/1/head
rodzic
9b1fbd3d9d
commit
e56afbd8e8
|
@ -5765,7 +5765,7 @@ SANE_Range *range=NULL;
|
||||||
static SANE_Status
|
static SANE_Status
|
||||||
init_options (Genesys_Scanner * s)
|
init_options (Genesys_Scanner * s)
|
||||||
{
|
{
|
||||||
SANE_Int option, count;
|
SANE_Int option, count, min_dpi;
|
||||||
SANE_Status status;
|
SANE_Status status;
|
||||||
SANE_Word *dpi_list;
|
SANE_Word *dpi_list;
|
||||||
Genesys_Model *model = s->dev->model;
|
Genesys_Model *model = s->dev->model;
|
||||||
|
@ -5845,7 +5845,14 @@ init_options (Genesys_Scanner * s)
|
||||||
DISABLE (OPT_BIT_DEPTH);
|
DISABLE (OPT_BIT_DEPTH);
|
||||||
|
|
||||||
/* resolution */
|
/* resolution */
|
||||||
for (count = 0; model->ydpi_values[count] != 0; count++);
|
min_dpi=200000;
|
||||||
|
for (count = 0; model->ydpi_values[count] != 0; count++)
|
||||||
|
{
|
||||||
|
if(model->ydpi_values[count]<min_dpi)
|
||||||
|
{
|
||||||
|
min_dpi=model->ydpi_values[count];
|
||||||
|
}
|
||||||
|
}
|
||||||
dpi_list = malloc ((count + 1) * sizeof (SANE_Word));
|
dpi_list = malloc ((count + 1) * sizeof (SANE_Word));
|
||||||
if (!dpi_list)
|
if (!dpi_list)
|
||||||
return SANE_STATUS_NO_MEM;
|
return SANE_STATUS_NO_MEM;
|
||||||
|
@ -5859,7 +5866,7 @@ init_options (Genesys_Scanner * s)
|
||||||
s->opt[OPT_RESOLUTION].unit = SANE_UNIT_DPI;
|
s->opt[OPT_RESOLUTION].unit = SANE_UNIT_DPI;
|
||||||
s->opt[OPT_RESOLUTION].constraint_type = SANE_CONSTRAINT_WORD_LIST;
|
s->opt[OPT_RESOLUTION].constraint_type = SANE_CONSTRAINT_WORD_LIST;
|
||||||
s->opt[OPT_RESOLUTION].constraint.word_list = dpi_list;
|
s->opt[OPT_RESOLUTION].constraint.word_list = dpi_list;
|
||||||
s->val[OPT_RESOLUTION].w = 300;
|
s->val[OPT_RESOLUTION].w = min_dpi;
|
||||||
|
|
||||||
/* "Geometry" group: */
|
/* "Geometry" group: */
|
||||||
s->opt[OPT_GEOMETRY_GROUP].title = SANE_I18N ("Geometry");
|
s->opt[OPT_GEOMETRY_GROUP].title = SANE_I18N ("Geometry");
|
||||||
|
|
Ładowanie…
Reference in New Issue