* backend/genesys_devices.c: reduced height of calibration area

* backend/genesys_gl841.c: fixed bug in offset calibration(offset values were
  not clamped to 0..255)
merge-requests/1/head
Pierre Willenbrock 2006-12-10 14:06:18 +00:00
rodzic b06eb2220b
commit 6a7fb3235a
3 zmienionych plików z 12 dodań i 2 usunięć

Wyświetl plik

@ -1,3 +1,9 @@
2006-12-10 Pierre Willenbrock <pierre@pirsoft.dnsalias.org>
* backend/genesys_devices.c: reduced height of calibration area
* backend/genesys_gl841.c: fixed bug in offset calibration(offset
values were not clamped to 0..255)
2006-12-10 Ulrich Deiters <ulrich.deiters@uni-koeln.de>
* canon: disentangled some pointer arithmetics in canon-sane.c

Wyświetl plik

@ -478,7 +478,7 @@ static Genesys_Model canon_lide_50_model = {
| GENESYS_FLAG_SKIP_WARMUP
| GENESYS_FLAG_OFFSET_CALIBRATION
| GENESYS_FLAG_DARK_WHITE_CALIBRATION, /* Which flags are needed for this scanner? */
300,
280,
400
};

Wyświetl plik

@ -4362,7 +4362,7 @@ gl841_offset_calibration (Genesys_Device * dev)
int turn;
char fn[20];
SANE_Bool acceptable = SANE_FALSE;
int mintgt = 0x600;
int mintgt = 0x2000;
DBG (DBG_proc, "gl841_offset_calibration\n");
@ -4706,6 +4706,10 @@ gl841_offset_calibration (Genesys_Device * dev)
off[j] = 0xffff;
} else
off[j] = -(mintgt * (off1[j] - off2[j]) + min2[j] * off1[j] - min1[j] * off2[j])/(min2[j]-min1[j]);
if (off[j] > 255)
off[j] = 255;
if (off[j] < 0)
off[j] = 0;
dev->frontend.offset[j] = off[j];
}