Re: Xsane-0.55: scan resolution selection (Epson 1200S, CVS Sane)

From: Dave Hill (dave@minnie.demon.co.uk)
Date: Sat Feb 19 2000 - 10:38:31 PST

  • Next message: Peter Kirchgessner: "Re: HP scanjet 6200C horizontal banding in color"

    Karl Heinz Kremer wrote:
    >
    > On Sat, Feb 19, 2000 at 01:23:49PM +0100, Oliver Rauch wrote:
    > > Hello Karl Heinz,
    > >
    > > the sane standard defines only one "resolution" as well known option.
    > > It does not make sense to have a "preview resolution" option because
    > > the frontend has to set the correct resolution in each case and like defined
    > > in the standard xscanimage and xsane do set the option "resolution".
    > >
    > > If the preview resolution option is removed from the epson backend
    > > everything will work fine.
    >
    > OK, so let me see if I understand this correctly: I don't have to set
    > the preview resolution in the backend, this is done in the frontend.
    > Therefore it does not make sense to have a "preview resolution" selection.
    >
    > If this assumtion is correct I can remove the preview resolution.
    > I do however doubt that "everything will work fine" after I remove
    > that option. You still don't know which resolutions are supported
    > by the scanner if I implement the resolution option as a range vs.
    > as a list. So the resolution list will still display a "synthetic"
    > set of resolutions.
    >

    The "preview resolution" was added by Christian I think. I never
    did work out the reason why.

    If you have no preview resolution, xsane will pick a suitable
    resolution depending on the area you want to scan, i.e. as you
    zoom in, the preview gets more detailed. This is what you normally
    want!

    With the preview resolution setting, you have to increase the
    resolution by hand if you want to see detail when you zoom in,
    but if you forget to reset it and try and do a full-page preview,
    xsane runs out of memory, tries to abort the scan and the scanner
    locks up (power cycle required).

    I don't know what xscanimage does though, I haven't checked. It
    probably does the same thing.

    You are correct that xsane "manufactures" the resolution list, it
    has no idea what resolutions are actually supported by the backend,
    only the "min", "max" and "quant" values returned. The epson backend
    sets "quant" to zero, which (I think) means "any resolution will do",
    so xsane happily makes up a list!

    In fact, the scanner *will* do any resolution you want, not just
    the ones it tells you about (at least my GT7000 does, the book says
    "50 to 4800 in 1 DPI increments, plus 7200 & 9600 with zoom").
    This is why I queried Christian's extra code for clamping the
    resolution to one of the scanner's values a while ago.

    There is an alternative, instead of returning "min", "max" and "quant",
    you can return the actual list instead, changing the type from
    CONSTRAINT_LIST to WORD_LIST. See the agfafocus backend for more
    on this. Xsane has code to handle this case as well as the
    CONSTRAINT_LIST version, so I assume that it will display the
    correct resolution list (although the code says > 50, so 50 DPI
    isn't included(!), and you only get 20 items max). Could be worth
    an #ifdef in the backend to try it.

    Sorry, I'm rambling... I hope that's right!

    Dave

    -- 
    Dave Hill, Kempston, Bedford UK		dave@minnie.demon.co.uk
    Sicth munce ago, I cutn't evun spel enjuneer, and now I are one!
    

    -- Source code, list archive, and docs: http://www.mostang.com/sane/ To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com



    This archive was generated by hypermail 2b29 : Sat Feb 19 2000 - 22:04:40 PST