diff --git a/ChangeLog b/ChangeLog index bcbc43fc5..61238cbea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-03-20 Stéphane Voltz + * backend/genesys_*.[ch]: gl841 sheetfed scanners calibration + improvement, fix document end detection when doing dynamic lineart. + Copyrights updates. + 2012-03-19 Gerhard Jaeger * backend/plustek.c: Fix batch scanning with Plustek backend Patch submitted and tested by Elias Oltmanns diff --git a/backend/genesys_gl841.c b/backend/genesys_gl841.c index 8d43a1a11..eae737b3f 100644 --- a/backend/genesys_gl841.c +++ b/backend/genesys_gl841.c @@ -3441,7 +3441,16 @@ gl841_detect_document_end (Genesys_Device * dev) /* the current scancnt is also the final one, so we use it to * compute total bytes to read. We also add the line count to eject document */ - total_bytes_to_read=(scancnt+postcnt)*dev->wpl; + if (dev->settings.dynamic_lineart && dev->settings.scan_mode == SCAN_MODE_LINEART) + { + /* dynamic lineart case */ + total_bytes_to_read=(scancnt+postcnt)*dev->wpl/8; + } + else + { + /* regular case */ + total_bytes_to_read=(scancnt+postcnt)*dev->wpl; + } DBG (DBG_io, "%s: old total_bytes_to_read=%u\n",__FUNCTION__,dev->total_bytes_to_read); DBG (DBG_io, "%s: new total_bytes_to_read=%u\n",__FUNCTION__,total_bytes_to_read);