On 02/11/2012 20:20, Alejandro Imass wrote: > I think I solved it, and it has to do with the maxlen param on the > read(). If I use (0) it fails but if I use 32768 it works. On other > scanners the 0 is equivalent to the maxlength but in the PNM it seems > to need to be explicit. > Hello,
I think a maxlen of 0 should be avoided. From SANE standard (section 4.3.10), the number of bytes returned can be anywhere from 0 to maxlen. So in this case, you'll always have 0 byte returned. Regards, Stef