plustek@linuxhacker.org

plustek@linuxhacker.org


Subject: distorted colors Primax 4800 Direct 30 bit
From: Tomas Nykung
Date: Sun, 14 Sep 2003 17:50:36 +0300

(Hope it's Ok to post to this group from news.gmane.org)

I have an old Primax 4800 Direct 30 bit parallel port scanner that I'm 
trying to get to work with Linux. The scanner is in good shape, almost not 
used at all and therefore I don't want to throw it away even if it's old.
According to man sane-plustek, this scanner is an Plustek OpticPro 4830.
The manpage also mentioned that this scanner isn't tested in linux, -well, 
now it is :)

System info:
Debian Woody with updates from Adrian Bunk
(http://www.fs.tum.de/~bunk/packages/)
This means that I'm using a little newer versions of sane than those in the 
stock Debian Woody distribution:
# dpkg -l \*sane\* |grep ^ii
ii  libsane        1.0.12-4.bunk  API library for scanners
ii  sane           1.0.11-0.bunk  Scanner graphical frontends
ii  sane-utils     1.0.12-4.bunk  API library for scanners -- utilities

For now I'm using a 2.4.21 kernel on this system (from the Bunk packages, 
that means that for now I'm not using an self compiled kernel.):
# uname -r
2.4.21-5-k7

I have installed the corresponding kernel headers package, and created a 
soft link in /usr/scr that points to those:
/usr/src# ls -la linux
lrwxrwxrwx  1 root  src 26 Sep 14 00:45 linux ->kernel-headers-2.4.21-5-k7

I use the plustek-sane-0.45-7.tar.gz backend from 
http://www.gjaeger.de/scanner/plustek.html, (I also tried with 
plustek-sane-0_40_17.tar.gz and plustek-sane-0.45-5.tar.gz).
The backend compiled without problems after I had created the softlink to 
the kernel headers (DOH! :)), and I can insmod the resulting pt_drv driver 
without problems. The scanner is detected correctly,
tail /var/log/syslog |grep pt_drv says (among other things, (no errors)):
4830P found on port 0x0378

The parallel port is set to EPP mode in the BIOS.

I use the xscanimage program (from within The Gimp), to scan, and it works 
perfectly otherwise, but now to the problem:
The colors are really badly distorted, and there is some stripes also in 
every image I try to scan. It looks to me like the color distorsion is more 
or less random (?), because scanning the same image over and over again 
with the same settings produces different results each time.
I put up two example pictures here:
http://www.multi.fi/~nykungs/primaxtest/

I tried with all different mov= options (I didn't expect that to work, but 
tried anyway) and forceMode= values of 0, 1 and 2 and slowIO= set to both 0 
and 1 but that doesn't help.
I also tried to look at the calibration code in the p48xx.c file, but I'm 
no C programmer, so unfortunately I didn't understand what could be changed 
to try to get the colors corrected (did I even look in the right file...?).

Anything more I could do to get this color problem corrected?


Tomas


plustek@linuxhacker.org