On Wednesday 28 December 2005 10:58, Ulrich Deiters wrote: > Indeed, I am using a big-endian machine.
Ok, then it's easy: On Tuesday 27 December 2005 20:07, Henning Meier-Geinitz wrote: > According to the SANE standard (3.2.1): "the bytes of each sample > value are transmitted in the machine's native byte order". On Wednesday 28 December 2005 12:18, Henning Meier-Geinitz wrote: > For backends, the SANE standard applies and that one specifies: "the > bytes of each sample value are transmitted in the machine's native > byte order". Therefore, on little endian machines, data sent to the > frontend by sane_read() must be little endian (and big endian on big > endian machines). So that the raw 2 bytes per pixel data from the scanner only need to be inverted in one of endianness (yours in that case). Inverting it without testing the architecture is what is causing the corrupted data here. I'm attaching a patch that I know to work here: It simply adds a #if, patch the comment, and moves the definition of b later to avoid a compilation warning (unused variable on little-endian comp's). Please check mie english! ;) I used the latest *debian* source, not the cvs source. I hope that's ok. -- Nirgal -------------- next part -------------- A non-text attachment was scrubbed... Name: canon-sane-endian.patch Type: text/x-diff Size: 1377 bytes Desc: not available Url : http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20051228/4ed86956/canon-sane-endian.bin From [email protected] Wed Dec 28 10:39:16 2005 From: [email protected] (MIchael Mueller) Date: Wed Dec 28 13:08:49 2005 Subject: [sane-devel] Lexmark X1150 Not working with Lexmark backend v1.0.17 Message-ID: <[email protected]> HI, Just compiled and installed the Sane Backend 1.0.17. With my mutli function X1150, it detects the scanner OK but when I attempt a preview or a normal scan the scanner keepa bumping across to the right hand side (looking at the scanner) this is where it actually starts from. The progam then hangs for a bit and finally produces a black page. Just submitting this as feed back was requested. Thanks for your efforts. MM
