[sane-devel] test backend: 1 bit RGB data for grid pattern
abel deuring
adeuring at gmx.net
Tue Sep 24 22:58:41 BST 2002
Hi all,
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
from:
SANE_Word xfull = x * 8 / 3 + x1;
to:
SANE_Word xfull = x * 8 / 3 + (7 - x1);
Abel
More information about the sane-devel
mailing list