[sane-devel] permanent calibration files

Henning Meier-Geinitz henning@meier-geinitz.de
Fri, 8 Feb 2002 22:16:07 +0100


Hi,

On Fri, Feb 08, 2002 at 09:53:36AM -0800, nathan rutman wrote:
> Where's the right place to store a permanent calibration file (created 
> once per scanner)?  Is there a facility for this?  Looks like 
> hp-option.c stores one in ~/.sane/calib-hp:device, but 
> a) I want mine per scanner, not per user.  

This means there must be some place in the file system writable by
everyone. Maybe /tmp? At least I don't know a differnt place. But if
you use this, be really carefull to not introduce yet another temp
file race. And be sure that the backend doesn't segfault if the data
is too short, too long or just wrong in any kind. You can't know who
wrote the file if everyone can access it.

> b) seems like this would be a common thing, so I was hoping for a sane_ 
> function to take care of it for me.  

At least for my backend I don't save calibration data as the
calibration must be redone after a lamp shut off. Otherwise the images
aren't that good. And the lamp of the scanners with calibration shut
off automatically after some time. So for me there is no need to save
the data.

But if there is the need and a good solution, you can propose a sanei
function.

Bye,
  Henning