From: Bastian Dehn Date: Thu, 6 Feb 2025 19:37:14 +0000 (+0100) Subject: fix set pixel shift X-Git-Tag: v1.0.32^2~1 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=547db5f59d4d699d5b0c62250a63ab2966118737;p=sane-kds-s2000w-net.git fix set pixel shift --- diff --git a/src/kds_s2000w_image_converter_netpbm.c b/src/kds_s2000w_image_converter_netpbm.c index 296d266..e0e44d1 100644 --- a/src/kds_s2000w_image_converter_netpbm.c +++ b/src/kds_s2000w_image_converter_netpbm.c @@ -150,7 +150,7 @@ void _kds_s2000w_image_converter_set_pixels(unsigned char data_byte, xel* pixels { unsigned char bit = 0; for (int i = 0; i < BYTE_BITS; i++) { - bit = data_byte >> i; + bit = data_byte >> i & 1; if (bit == 0) pixels[i].b = PNM_MAXMAXVAL; }