diff --git a/ChangeLog b/ChangeLog index e86437fb9..5212b009f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-12-10 Pierre Willenbrock + + * 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 * canon: disentangled some pointer arithmetics in canon-sane.c diff --git a/backend/genesys_devices.c b/backend/genesys_devices.c index fc82b8f08..32f044f81 100644 --- a/backend/genesys_devices.c +++ b/backend/genesys_devices.c @@ -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 }; diff --git a/backend/genesys_gl841.c b/backend/genesys_gl841.c index 86b9bb222..47389a090 100644 --- a/backend/genesys_gl841.c +++ b/backend/genesys_gl841.c @@ -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]; }