Re: [Announce] WinSANE 0.1.0.0 Release

Brian Macy (bmacy@sunshinecomputing.com)
Mon, 10 May 1999 07:02:43 -0700

> For a bit-oriented scan (lineart) you can safely assume everyone is agreed
> about which order the bits go in. Networks transfer a byte at a time.
>
> For a byte-oriented scan (8-bit grey, 24-bit colour) there's also nothing
> to worry about, we're all agreed how to send a byte over a network.
>
> However, multi-byte samples (10 bit grey, 36 bit colour etc.) require
> that you compare your endianess with the backend, and if they're different
> convert. This ONLY applies to image data, everything else uses network
> byte order to solve this problem.
>
> If (as I suspect) this version of WinSANE doesn't support anything bigger
> than 8-bit samples, (ie 24-bit colour) then you needn't worry about it.

Thanks... you are correct it doesn't. I was looking at the code for SANE and
it didn't look like it handled >8bits per color too. There were a couple of
locations in the frontends where it errored if bit depth was anything
besides 1 or 8. Oh well... hopefully people will still find use for it
without such support. I'd still like to know how in the world you would code
this to be anything besides... swapping bits is kind of strange. So are you
telling me that for MSB 10bit data you get:
98765432 10987654 ... etc
but for LSB 10bit you get:
76543210 98543210 98763210 ... etc.
or is it
76543210 98765432 10987654 ... etc.

I must say anything besides MSB is a bit psychotic.

> Hmm. The TWAIN toolkit, at least in recent versions looked like a pretty
> straight forward "fill in the blanks" piece of software. I can't offer to
> help here (no Win32 experience, and no desire to get some) but I suspect
> that plugging your GUI onto TWAIN is pretty easy.
>
> Since SANE already handles all the fiddly decisions about how to express
> scanner capabilities, in the backend, you'll probably have less work to
> do than someone implementing TWAIN for a single device... I hope.

I've looked at the TWAIN toolkit... I might have to install VC++ to not be
pulling my hair out (uugggh). Anyways, I basically replemented the net
backend from scratch to make my life easier and to help figure out the exact
formatting of the protocol. But the information sane provides is still
available and useful. I still wish the protocol had another behavior besides
"if error, shutdown" but it doesn't.

Brian Macy

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