big endian vs little endian

From: William L. Sebok (wls@astro.umd.edu)
Date: Thu Mar 29 2001 - 15:10:30 PST

  • Next message: Robert Voigt: "Xsane build problems"

    I think that there could be "big vs little endian" issues if one does network
    scanning and the scanner is hung off of a machine with a different byte order
    than the machine running the front end.

    The scanner (a Umax 2400S) was attached to a Sparc IPX machine (an old spare
    machine) running Solaris 7. The frontend was xsane 0.72 on a Linux Intel
    machine running Mandrake 7.1. On both machines sane itself had been
    upgraded to version 1.0.4. I ran xsane stand-alone, rather than as a gimp
    plugin. On the xsane "standard options" window I selected a "Bit Depth" of 12.
    I scanned to a png file as that format supports 16 bit data. I viewed the
    image with the gimp as the gimp is able to view 16 bit png's, although it
    converts it to 8 bits internally. The image came out looking like random noise.
    My guess is that I was viewing the bytes of lower significance. I tried this
    with both gimp-1.2.1 and gimp-1.0.4 on both Linux Intel and Sparc Solaris
    machines with the same results. Finally I rescanned the image with the
    xsane 0.72 running on a Sparc Solaris machine (different than the machine with
    the scanner). Again Bit Depth was set to 12 and the png format was used. This
    scan now came out fine.

    Has anyone else had this problem? Does the sane protocol have provision for
    the case where front and back ends are on machines with different byte orders?

    Bill Sebok Computer Software Manager, Univ. of Maryland, Astronomy
            Internet: wls@astro.umd.edu URL: http://www.astro.umd.edu/~wls/

    --
    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 : Thu Mar 29 2001 - 15:01:34 PST