[sane-devel] wrong colors

Karsten Festag karsten.festag at gmx.de
Tue Feb 25 21:48:38 GMT 2003


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

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

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

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

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

If you have some more questions ore comments - please ask, I hope I can answer 
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 normal 
user, only as root.


Bye 

Karsten



More information about the sane-devel mailing list