[sane-devel] sane-sp15c and Fujitsu 620c: Help needed for plumbing backend to frontend

Frank Zago fzago at austin.rr.com
Thu Mar 25 08:44:15 GMT 2004


Garrick Sitongia wrote:
> The brightness and contrast levels are presently not supported by the 
> sp15c backend. These are presently hardcoded at 128. But I was able to 
> get it working in the hardware by adding "scanf" statements in sp15c.c. 
> Scanimage stops and I can enter numbers for brightness and contrast each 
> time I run scanimage.
> 
>   scanf("%d", &c);    /* my code */
>    = c;
>  dev->threshold = 128;
>   scanf("%d", &c);    /* my code */
>  dev->contrast = c;
> 
> How instead do I pass these numbers to the backend from scanimage? Where 
> scanimage would get them the usual way from command line args?
> 
> Garrick
> 
> _________________________________________________________________
> FREE pop-up blocking with the new MSN Toolbar – get it now! 
> http://toolbar.msn.com/go/onm00200415ave/direct/01/
> 
> 

It seems that the backend has these options, but they are de-activated almost 
all the time.

In sane_control_option(), see all the lines like
    scanner->opt[OPT_BRIGHTNESS].cap = SANE_CAP_INACTIVE;

This tells the frontend not to offer the option.

You can change some to
    scanner->opt[OPT_BRIGHTNESS].cap &= ~SANE_CAP_INACTIVE;
to activate them.

Then, if the option is active, use the value with
   dev->brightness = scanner->val[OPT_BRIGHTNESS].w;


Hope that helps,
   Frank.




More information about the sane-devel mailing list