epjitsu: read page_width pixels from scanner

This commit fixes a regression introduced in 1.0.25 for ADF scanners:
the scanning page-width was always set to a fixed value,
ignoring the page-width provided by the frontend.

This commit restores the behaviour that allows changing the page-width.

Signed-off-by: Peter Marschall <peter@adpm.de>
pixma-add-canon-ts-3400-series
Peter Marschall 2014-09-21 14:45:49 +02:00 zatwierdzone przez Povilas Kanapickas
rodzic 79e76258cb
commit d829ff835a
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -2180,7 +2180,7 @@ change_params(struct scanner *s)
/* adf with specified paper size */
s->front.height = SCANNER_UNIT_TO_PIX(s->page_height, s->front.y_res);
}
s->front.width_pix = s->block_img.width_pix;
s->front.width_pix = SCANNER_UNIT_TO_PIX(s->page_width, s->resolution * img_heads);
s->front.x_start_offset = (s->block_xfr.image->width_pix - s->front.width_pix)/2;
switch (s->mode) {
case MODE_COLOR: