No subject
Sat Dec 3 12:15:27 GMT 2022
.
.
.
/* expand 4-bit pixels to 8-bit bytes */
if (scanner->composition == WD_comp_G4)
{
src = &scanner->buffer[data_to_read - 1];
dst = &scanner->buffer[data_to_read * 2 - 1];
for (i = 0; i < data_to_read; i++)
{
*dst-- = (*src << 4) & 0xf0;
*dst-- = (*src--) & 0xf0;
}
data_to_read *= 2;
}
.
.
.
I'm a little confused. This is a SCSI scanner, I don't see a bandwidth
bottleneck on the HW side...
Does SANE require grayscale to be 8 BPP, or am I just completely missing
why one would want to shift 4 bits of information into the most
significant bits of twice as many bytes?
Granted, it _should_ compress down to about where it ought to be, and the
compression ratios on the 4-bit scans are around 92%. This would lead one
to think it all comes out in the wash, but still...
Thanks,
-Greg
More information about the sane-devel
mailing list