[sane-devel] Epson Perfection 610 Issue with 150 dpi scan
Alessandro Zummo
azummo-lists at towertech.it
Sun Jan 3 15:48:05 UTC 2010
On Sun, 3 Jan 2010 15:14:38 +0100
Rainer Dorsch <rdorsch at web.de> wrote:
> Are these the areas in epson2.c you are refering to:
>
> /*
> * Make sure that the number of lines is correct for color shuffling:
> * The shuffling alghorithm produces 2xline_distance lines at the
> * beginning and the same amount at the end of the scan that are not
> * useable. If s->params.lines gets negative, 0 lines are reported
> * back to the frontend.
> */
> if (s->hw->color_shuffle) {
> s->params.lines -= 4 * s->line_distance;
> if (s->params.lines < 0)
> s->params.lines = 0;
>
> DBG(1, "adjusted params.lines for color_shuffle by %d
> to %d\n",
> 4 * s->line_distance, s->params.lines);
> }
>
> DBG(5, "resolution = %d, preview = %d\n",
> s->val[OPT_RESOLUTION].w, s->val[OPT_PREVIEW].w);
>
> DBG(5, "get para %p %p tlx %f tly %f brx %f bry %f [mm]\n",
> (void *) s, (void *) s->val, SANE_UNFIX(s->val[OPT_TL_X].w),
> SANE_UNFIX(s->val[OPT_TL_Y].w), SANE_UNFIX(s->val[OPT_BR_X].w),
> SANE_UNFIX(s->val[OPT_BR_Y].w));
>
> and
>
> /* allocate buffers for color shuffling */
> if (dev->color_shuffle == SANE_TRUE) {
> int i;
> /* initialize the line buffers */
> for (i = 0; i < s->line_distance * 2 + 1; i++) {
>
> if (s->line_buffer[i] != NULL)
> free(s->line_buffer[i]);
>
> s->line_buffer[i] = malloc(s->params.bytes_per_line);
> if (s->line_buffer[i] == NULL) {
> DBG(1, "out of memory (line %d)\n", __LINE__);
> return SANE_STATUS_NO_MEM;
> }
> }
> }
>
> I think a first good step would be to enable debug output.
>
> How can I enable the output in DBG() from scanimage ?
Those are two of the involved sections. However I did not wrote
them so I can just hope they work nicely ;)
You can enable debug with SANE_DEBUG_EPSON2=XX
where XX is a value between 1 and 255.
Thanks for the remote access offer but I'll be quite busy for the
forthcoming weeks :(
> > For such a scanner, I'd suggest to scan a bigger area
> > and then refine by software.
>
> I to now worry a lot about the 2-3 mm missing in the scan (12 lines at
> 150dpi), the problem is that the pnm file is broken and most programs reject
> to work with it. E.g. gscan2pdf uses convert from imagemagick to generate
> pdfs. But that all only works it the pnm files are correct and not corrupted.
> For me a fix which at least generates correct pnm files would be fine.
Did you tried other scanning software?
--
Best regards,
Alessandro Zummo,
Tower Technologies - Torino, Italy
http://www.towertech.it
More information about the sane-devel
mailing list