[sane-devel] test backend: 1 bit RGB data for grid pattern
Tue, 24 Sep 2002 23:58:41 +0200
while playing with the test backend, I noticed that the "scan data"
produced for the grid pattern in 1 bit RGB mode differs from the output
for 1 bit grayscale mode. The data for gray scale mode is like:
... 00 00 00 0f ff ff ff f0 00 00 00 ...
while the data for 1 bit RGB mode is:
... 00 00 00 f0 ff ff ff 0f 00 00 00 ...
(where one number in the line above means actually "means" three bytes
for the three colors.)
I'm too tired to check the Sane API doc, instead a question: Am I right
that this is a bug, or do we have different bit orders for 1 bit gray
and RGB mode ?
I don't think so; the fix would be to change line 173 in test-picture.c
SANE_Word xfull = x * 8 / 3 + x1;
SANE_Word xfull = x * 8 / 3 + (7 - x1);