On Thu, May 21, 2009 at 1:24 PM, Mark Pemburn <mark at pemburn.com> wrote: > Hi All, > > ? The marvels of the SANE standard are starting to become clearer to me and > I'm making good progress in getting and setting the various device options > in my OS X interface project. ?However, since I have only the one Canon > N670U scanner to play with (at the moment, anyhow -- I'm borrowing a Fujitsu > fi5110c from a client), I have no way to compare how options are treated > from one device to another. ?Should I be able to assume that say, the > "resolution" option will _always_ have a constraint type of > SANE_CONSTRAINT_RANGE with a "min", "max" and a "quant" showing the steps > between or that "mode" will consistently provide a string list of supported > modes? ?If not, are there any guidelines that would help the interface > programmer work around such things?
The only 'standard' options are the 'well-known' options listed in the sane spec, and that is sometimes just the names. But, a backend is free to exclude those options, or implement them in a different way. For instance, the fujitsu backend shows the resolution as SANE_CONSTRAINT_RANGE when your machine supports it, but for older machines, you will get a SANE_CONSTRAINT_WORD_LIST, since they only support a few fixed resolutions. So, dont assume anything :) The reason that the options are so descriptive is exactly so that you WONT have to code things specific to that option. That said- there is still some room for improvement/consistency. allan -- "The truth is an offense, but not a sin"
