gamma and xscanimage

From: mh (crapsite@gmx.net)
Date: Tue Nov 07 2000 - 02:08:37 PST

  • Next message: mh: "Re: gamma and xscanimage (oops)"

    Hi,
    at the moment I'm trying to implement gamma-table options in the pnm backend
    (I need this for some tests).
    I did the following:

    { /* grayscale gamma vector */
          "gamma-table",
          "Image intensity",
          "Gamma-correction table. In color mode this option equally affects the " \
          "red, green, and blue channels simultaneously (i.e., it is an intensity " \
          "gamma table).",
          SANE_TYPE_INT,
          SANE_UNIT_NONE,
          sizeof(SANE_Word)*256,
          SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT | SANE_CAP_INACTIVE,
          SANE_CONSTRAINT_RANGE,
          {(SANE_String_Const *) &gamma_range}
    }

    and the same for red, green and blue.

    I initialize the gamma tables like this:

      for(i=0;i<256;i++)
      {
        gamma[0][i] = i;
        gamma[1][i] = i;
        gamma[2][i] = i;
        gamma[3][i] = i;
      }

    Now I expected to see a line in the gamma widget in xscanimage from left/bottom
    to top/right. However, the line is drawn for 25 percent of the widget, the rest
    displays garbage.
    (please see: http://users.yoobay.org/crapsite/etc/gamma.png)
    Is this a known problem with xscanimage or must the gamma options have
    a size of 1024*sizeof(SANE_Word)?

    Thanks
    Michael

    --
    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 : Tue Nov 07 2000 - 03:07:24 PST