Re: image data format polarity

From: Henning Meier-Geinitz (hmg-ml@gmx.de)
Date: Fri Sep 22 2000 - 11:43:57 PDT

  • Next message: Henning Meier-Geinitz: "Re: will my scanner work"

    Hi,

    On Thu, Sep 21, 2000 at 10:50:14PM +0100, Nick Lamb wrote:
    > > Does anyone really think it would be a good idea to change an existing
    > > standard in such a point? I don`t think so.
    >
    > Chaper, section, subsection reference to the STANDARD please Oliver,

    I don't think it's defined anywhere in the SANE standard.

    > or do you mean "I don't want to change XSane at this point" ?

    I'm not Oliver but I don't think it's a problem of changing a single
    frontend. This change would probabaly involve updating more than 30 backends
    and a lot of them are unsupported. Please, let's not do global changes that
    are not absolutely necessary. I had some experiences with changing all the
    backends concerning simple things like DBG instead of fprintf, includes and
    sanei_config_read() instead of fgets. It's a nightmare. Further more,
    changing the backend and frontends would result in a total mess if a user
    mixes old backends an new frontends or vice versa.

    > Well, it looks broken and is definitely inconsistent. "We always did
    > the wrong thing" is not a good excuse for doing the wrong thing,
    > especially when we're so early in the life of SANE.

    That's right. But if "the wrong thing" works properly and just doesn't look
    nice we shouldn't break it during major releases.

    > This will catch
    > out everyone who tries to implement the spec from scratch (not by
    > cutting and pasting code as most have so far)

    The behaviour of the SANE API is not defined concerning the meaning of color
    values as it is not defined concerning some other points in SANE. The
    developer has to decide what to do and will probably decide to look at other
    implementations.

    > I would prefer that it be corrected in the implementations and
    > clarified in the spec. If not, the spec must be changed to indicate
    > how existing implementations do it, with a footnote explaining that
    > this is a result of a ridiculous historical artifact.

    I propose to just add a description of the current behaviour to the
    standard. I don't think comments about opinions about the sense of the
    definition will help any developer.

    Proposal (section{Image Data Format}, after second paragraph):

    "For bit depths of 8 and 16, 0 means the lowest intensity of color (or black
    for gray frames) and 255 repectively 65535 means the highest intensity of
    color (or white for gray frames). For a bit depth of 1, a value of 0 means
    white and a value of 1 means black."

    Please correct errors and language (I'm not a native speaker).

    On the other hand we may think about a change in SANE 2.0 because all
    backends and frontends will have to be updated in any case.

    I will add this as a point of discussion in LEVEL2.

    Bye,
      Henning

    --
    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 Sep 23 2000 - 22:05:42 PDT