[sane-devel] wrong colors

Karsten Festag karsten.festag@gmx.de
Tue, 25 Feb 2003 22:48:38 +0100


Hi Christoph,
I checked your logfiles and I have an idea where the problem might be. If=
 my=20
theory is correct, all pictures with an even number of pixels in width ar=
e=20
correct and all with an odd width have wrong colors. In the status line o=
f=20
xsane you see the dimensions if the scan also in pixels, you could use th=
is=20
to check my theory.=20
To (hopefully) solve this problem we will have to make a little modificat=
ion=20
to the source code and then to recompile SANE. If you like to try this: h=
ere=20
is the change you could make:

in the file 'microtek2.c' in the 'sane-backends/backend' directory of the=
=20
sources please find the function 'check_inquiry'. There are the following=
=20
lines:

        case 0x91:
          *model_string =3D "ScanMaker X6 / Phantom 636";
          /* The X6 indicates a data format of segregated data in TMA mod=
e */
          /* but actually transfers as chunky data */
          md->model_flags |=3D MD_DATA_FORMAT_WRONG;
          if ( md->revision =3D=3D 1.00 )
              md->model_flags |=3D MD_OFFSET_2;
          break;

Please comment out the if-statement so that it looks like:

        case 0x91:
          *model_string =3D "ScanMaker X6 / Phantom 636";
          /* The X6 indicates a data format of segregated data in TMA mod=
e */
          /* but actually transfers as chunky data */
          md->model_flags |=3D MD_DATA_FORMAT_WRONG;
          /* if ( md->revision =3D=3D 1.00 )
              md->model_flags |=3D MD_OFFSET_2; */
          break;

If you have some more questions ore comments - please ask, I hope I can a=
nswer=20
sooner than this time.

> Could be a problem with wrong group /dev/sg0 (the scanner) belongs to?
> I've a look, and /dev/sg0 was root.cdrecording (i think, k3bsetup
> changed it), but my cd-devices are sr0 and sr1, and they're working.

That should be no problem. Otherwise you wouldn't be able to scan as norm=
al=20
user, only as root.


Bye=20

Karsten