> How can you set SANE_INFO_RELOAD_OPTIONS during the scan? You can only do this > in sane_control_option as far as I see.
You're right. I wasn't clear about that. What I actually do is set a flag so that the next time sane_control_option is called, it will set SANE_INFO_RELOAD_OPTIONS no matter which option is requested. > > - If the first thing I do after the scan is click on the image number > > slider, > > xscanimage aborts with a memory fault > > Oops. It probably trys to access the option_descriptor. Did you malloc a new > one? The option_descriptor must stay valid until sane_close (or a reload). No, the option descriptors are all in a statically allocated array. > > - If I click on something else like a checkbox, then the slider range also > > gets updated. > > Maybe the checkbox set "SANE_INFO_RELOAD_OPTIONS"? Probably. Even if it wouldn't normally do it, the flag I set during the scan would force it in this case. > Maybe it makes sense to reload all options after the scan automatically. Does > xsane do this? I don't know how hard that would be to implement, but I think it might be a good idea. While I can't think of any real-life examples offhand, it seems quite possible that there are other reasons why an option might change during a scan. Pete Fales