kopia lustrzana https://gitlab.com/sane-project/backends
Fix endianness problems in gray mode
rodzic
300349a7ed
commit
02e0cf229e
|
@ -1,3 +1,6 @@
|
|||
2005-03-20 Earle F. Philhower III <earle@ziplabel.com>
|
||||
* backend/sm3840_scan.c: Big-endian graymode fix
|
||||
|
||||
2005-03-17 Gerard Klaver <gerard at gkall dot hobby dot nl>
|
||||
|
||||
* doc/descriptions-external/samsung.desc added
|
||||
|
|
|
@ -175,6 +175,8 @@ setup_scan (usb_dev_handle * udev, SM3840_Params * p)
|
|||
int i, j;
|
||||
int red, green, blue;
|
||||
unsigned char rd_byte;
|
||||
unsigned short GRAYMASK = 0xc000;
|
||||
|
||||
|
||||
#ifndef BACKENDNAME
|
||||
char fname[64];
|
||||
|
@ -766,9 +768,10 @@ setup_scan (usb_dev_handle * udev, SM3840_Params * p)
|
|||
write_regs (udev, 6, 0xb0, 0x00, 0xb1, 0x80, 0xb2, 0x07, 0xb3, 0xff, 0xb4,
|
||||
0xbf, 0xb5, 0x07);
|
||||
write_vctl (udev, 0x0c, 0x0002, whitemapsize, 0x00);
|
||||
fix_endian_short (&GRAYMASK, 1);
|
||||
if (gray)
|
||||
for (i = 0; i < whitemapsize / 2; i++)
|
||||
lightmap[i] |= 0xc000;
|
||||
lightmap[i] |= GRAYMASK;
|
||||
len =
|
||||
usb_bulk_write (udev, 2, (unsigned char *) lightmap, whitemapsize,
|
||||
wr_timeout);
|
||||
|
|
Ładowanie…
Reference in New Issue