[sane-devel] PNM Driver problem scanimage (sane-backends) 1.0.22; backend version 1.0.22

Stef stef.dev at free.fr
Fri Nov 2 21:28:10 UTC 2012


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




More information about the sane-devel mailing list