Garrick Sitongia wrote: > The brightness and contrast levels are presently not supported by the=20 > sp15c backend. These are presently hardcoded at 128. But I was able to=20 > get it working in the hardware by adding "scanf" statements in sp15c.c.= =20 > Scanimage stops and I can enter numbers for brightness and contrast eac= h=20 > time I run scanimage. >=20 > scanf("%d", &c); /* my code */ > =3D c; > dev->threshold =3D 128; > scanf("%d", &c); /* my code */ > dev->contrast =3D c; >=20 > How instead do I pass these numbers to the backend from scanimage? Wher= e=20 > scanimage would get them the usual way from command line args? >=20 > Garrick >=20 > _________________________________________________________________ > FREE pop-up blocking with the new MSN Toolbar =96 get it now!=20 > http://toolbar.msn.com/go/onm00200415ave/direct/01/ >=20 >=20
It seems that the backend has these options, but they are de-activated al= most=20 all the time. In sane_control_option(), see all the lines like scanner->opt[OPT_BRIGHTNESS].cap =3D SANE_CAP_INACTIVE; This tells the frontend not to offer the option. You can change some to scanner->opt[OPT_BRIGHTNESS].cap &=3D ~SANE_CAP_INACTIVE; to activate them. Then, if the option is active, use the value with dev->brightness =3D scanner->val[OPT_BRIGHTNESS].w; Hope that helps, Frank.