diff --git a/ChangeLog b/ChangeLog index 0622c64a3..0dba1ccd5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,12 +1,12 @@ -2012-02-06 Rolf Bensch - * backend/pixma_mp150, doc/descriptions/pixma.desc, doc/sane-pixma.man: - New scanner Canon PIXMA MX360. - -2012-02-03 Rolf Bensch +2012-02-09 Rolf Bensch * backend/pixma.[ch], backend/pixma_common.[ch], backend/pixma_sane_options.[ch], backend/pixma_mp{150,810}.c: 1 bit B/W lineart for pixma_mp150 and pixma_810 subdrivers. +2012-02-06 Rolf Bensch + * backend/pixma_mp150, doc/descriptions/pixma.desc, doc/sane-pixma.man: + New scanner Canon PIXMA MX360. + 2012-02-03 Rolf Bensch * backend/pixma.h: set PIXMA_VERSION_{MAJOR,MINOR,BUILD} to 0.16.3. diff --git a/backend/pixma_common.c b/backend/pixma_common.c index ab01ff6a3..cd834cb95 100644 --- a/backend/pixma_common.c +++ b/backend/pixma_common.c @@ -343,7 +343,9 @@ pixma_rgb_to_gray (uint8_t * gptr, uint8_t * sptr, unsigned w, unsigned c) * @param dst pointer where to store result * @param src pointer to raw data * @param width width of the processed line - * @param c 3 for 3-channel single-byte data, 6 for double-byte data + * @param c 1 for 1-channel single-byte data, + * 3 for 3-channel single-byte data, + * 6 for double-byte data * */ uint8_t * pixma_binarize_line(pixma_scan_param_t * sp, uint8_t * dst, uint8_t * src, unsigned width, unsigned c) @@ -364,7 +366,8 @@ pixma_binarize_line(pixma_scan_param_t * sp, uint8_t * dst, uint8_t * src, unsig } /* first, color convert to grayscale */ - pixma_rgb_to_gray(dst, src, width, c); + if (c != 1) + pixma_rgb_to_gray(dst, src, width, c); /* second, normalize line */ min = 255; diff --git a/backend/pixma_mp150.c b/backend/pixma_mp150.c index 6a8628608..7366d2495 100644 --- a/backend/pixma_mp150.c +++ b/backend/pixma_mp150.c @@ -1055,8 +1055,8 @@ post_process_image_data (pixma_t * s, pixma_imagebuf_t * ib) /* Crop line to selected borders */ memmove(cptr, sptr + cx, cw); - /* Color to Lineart convert for CCD sensor */ - if (is_ccd_lineart (s)) + /* Color / Gray to Lineart convert */ + if (s->param->software_lineart) cptr = gptr = pixma_binarize_line (s->param, gptr, cptr, s->param->w, c); /* Color to Grayscale convert for CCD sensor */ else if (is_ccd_grayscale (s))