Package: sane-utils
Version: 1.3.0-1
Severity: normal

Sumary: man says --buffer-size gets a value in KB, but scanimage actually
assumes it is MB.



Today I tried to scan with a command that used to work until last week (when I
updated sane-utils from 1.2.1-7+b3 to 1.3.0-1) and got an error:

   ceppo@mypc:~/Pictures/scan$ scanimage --format=png --output-file=out.png 
--resolution=300 --mode=Color
   [07:57:39.150351] [hp5590] hp5590_bulk_read: USB-in-USB: buffer too small
   scanimage: sane_read: Out of memory

So I tried to increase the buffer size. man says

    -B [size], --buffer-size=size
           changes input buffer size from the default of 1MB to size KB.

and usually my scans are around 4MB each, so I tried to increase the buffer
size to 5MB with --buffer-size=5000:

        ceppo@mypc:~/Pictures/scan$ scanimage --format=png 
--output-file=out.png --resolution=300 --mode=Color --buffer-size=5000
    [07:58:34.930476] [hp5590] Data requested won't fit in the bulk read buffer 
(requested: 5117850, buffer size: 1048576
    scanimage: sane_read: Out of memory

I assumed the output message uses bytes, therefore complaining about me
requesting a 5GB buffer. So I tried --buffer-size=5 and I got my scan (4.5MB).

I don't know what's the expected behaviour, but of course doc and actual
behaviour should be consistent.

Cheers,


--
Ceppo

Attachment: signature.asc
Description: PGP signature

Reply via email to