# Re: Mustek 600 IIN color question

Henning Meier-Geinitz (henningmg@gmx.de)
Sat, 27 Nov 1999 14:06:19 +0100

- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- Next message: Mathias Wennberg: "Mustek 600 IIN color patch"
- Previous message: Larry Snyder: "Re: SANE support on Solaris 2.6"

Hello,

[color problem with mustek 600 II N]

There are (at least) two firmware versions. The backend seems to work
with one of these, the other shows the behaviour mentioned in your
mail. I have written a small patch a long time ago but it wasn't build
into sane because it could break the backend for users of the other
firmware version. The patch doesn't fix the problem totally but the
images are usable (for me). There remain some stripes after the end of
the scanned image. Perhaps I can fix this some time but don't count on
this.

> Is it possible to get this scanner to scan in color under Linux? If so,
> how do I do (simple version please, I am not directly used to recompile
> programs and such stuff)?

You must use the source (tar.gz), I don't have experience with the
source rpms. Deinstall your existing sane and download the sane source
code (e..g from http://www.mostang.com/sane/). Unpack the tar file in
some directory (e.g. /usr/src/). Cd to the sane directory
(/usr/src/sane-1.0.1) and patch the source code
(patch -p1 <patchfile). The patchfile is attached to this mail. Read the
documentation for compiling and installation and install sane. Don't
use line-distance-fix as the scanner reports its line-distance
correctly.

Feel free to ask again if you get stuck.

Ciao, Henning

Patchfile:

diff -ru sane-0.72.orig/backend/mustek.c sane-0.72/backend/mustek.c
--- sane-0.72.orig/backend/mustek.c Tue Mar 3 04:02:43 1998
+++ sane-0.72/backend/mustek.c Mon Apr 13 21:25:53 1998
@@ -1394,7 +1394,7 @@
}
}
- num_saved_lines = s->ld.index[0] - s->ld.index[2];
+ num_saved_lines = s->ld.index[0] - s->ld.index[1];
if (num_saved_lines > 0)
/* restore the previously saved lines: */
memcpy (out, s->ld.buf[0], num_saved_lines * bpl);
@@ -1404,10 +1404,10 @@
if (++s->ld.lmod3 >= 3)
s->ld.lmod3 = 0;
- c = color_seq[s->ld.lmod3];
+ c = s->ld.lmod3;
if (s->ld.index[c] < 0)
++s->ld.index[c];
- else if (s->ld.index[c] < s->params.lines)
+ else /*if (s->ld.index[c] < s->params.lines)*/
{
s->ld.c[c].Qk += s->ld.peak_res;
if (s->ld.c[c].Qk > s->ld.max_value)
@@ -1421,17 +1421,17 @@
DBG (1, "fix_line_distance_pp: lmod3=%d, index=(%d,%d,%d)\n",
s->ld.lmod3,
s->ld.index[0], s->ld.index[1], s->ld.index[2]);
- num_lines = s->ld.index[2] - s->ld.ld_line;
+ num_lines = s->ld.index[1] - s->ld.ld_line;
/* copy away the lines with at least one missing
color component, so that we can interleave them
with new scan data on the next call */
- num_saved_lines = s->ld.index[0] - s->ld.index[2];
+ num_saved_lines = s->ld.index[0] - s->ld.index[1];
memcpy (s->ld.buf[0], out + num_lines * bpl,
num_saved_lines * bpl);
/* notice the number of lines we processed */
- s->ld.ld_line = s->ld.index[2];
+ s->ld.ld_line = s->ld.index[1];
/* return number of complete (r+g+b) lines */
return num_lines;
}

    --
    Source code, list archive, and docs: http://www.mostang.com/sane/
    To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com

- Next message: Mathias Wennberg: "Mustek 600 IIN color patch"
- Previous message: Larry Snyder: "Re: SANE support on Solaris 2.6"