[sane-devel] question about test backend and invert-endianess

James Ring sjr at jdns.org
Fri Jan 3 05:48:47 GMT 2020


Hi all,

I noticed that

scanimage -d net:localhost:test \
--depth 16 --mode Color \
--test-picture 'Color pattern'  > /tmp/out.pnm

and

scanimage -d net:localhost:test \
--depth 16 --mode Color \
--test-picture 'Color pattern' \
--invert-endianess > /tmp/out-invert-endianess.pnm

produce different results. My understanding is that the saned server
should indicate the byte ordering, allowing the client to convert to
its internal byte ordering. This is not happening for the test backend
with saned frontend. It appears the saned server will send back the
saned host byte ordering that is determined at compile time, ignoring
the invert-endianess option.

Incidentally, the same is true if you use `-d test` directly and skip saned.

This makes it hard to test my code to make sure I'm handling
endianness correctly

Am I misunderstanding the purpose of --invert-endianess?

Thanks,
James



More information about the sane-devel mailing list