]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
fix set pixel shift
authorBastian Dehn <hhaalo@arcor.de>
Thu, 6 Feb 2025 19:37:14 +0000 (20:37 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Thu, 6 Feb 2025 19:37:33 +0000 (20:37 +0100)
src/kds_s2000w_image_converter_netpbm.c

index 296d2663332ebabf0b76c7a60f11d0c971a8b62b..e0e44d1386a8287ac290e37691f7acdfba66f060 100644 (file)
@@ -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;
        }