[sane-devel] sane_read: Out of memory

Sean Darcy seandarcy2 at gmail.com
Mon May 5 15:42:36 UTC 2014


Using a Brother MFC7360N on Fedora 20, 
sane-backends-1.0.24-7.fc20.x86_64, I'm trying do a high resolution 
color scan. I've got plenty of ram:

KiB Mem:   3956764 total,  2669148 used,  1287616 free,       40 buffers
KiB Swap:  6143996 total,  1003996 used,  5140000 free,  1144384 cached

and disk space. top doesn't show any problem.

The specs for the 7360N are up to 600x2400 optical.

scanimage -A
scanimage: rounded value of br-x from 215.9 to 215.88
scanimage: rounded value of br-y from 355.6 to 355.567

All options specific to device `brother4:net1;dev0':
   Mode:
     --mode Black & White|Gray[Error Diffusion]|True Gray|24bit 
Color|24bit Color[Fast] [24bit Color[Fast]]
         Select the scan mode
     --resolution 100|150|200|300|400|600|1200|2400|4800|9600dpi [200]
         Sets the resolution of the scanned image.
     --source FlatBed|Automatic Document Feeder(left aligned)|Automatic 
Document Feeder(centrally aligned) [Automatic Document Feeder(left aligned)]

BTW, what does --resolution set: width (600) or height (2400) ?


At 1200 resolution, it works:

scanimage -vvv --format pnm -x 215.9 -y 279.4 --mode '24bit Color' -d 
'brother4:net1;dev0' --resolution 1200 --source FlatBed -p
scanimage: value for --x is: 215.9
scanimage: value for --y is: 279.4
scanimage: value for --resolution is: 1200
scanimage: rounded value of br-x from 215.9 to 215.88
scanimage: rounded value of br-y from 279.4 to 279.374
scanimage: scanning image of size 9920x13195 pixels at 24 bits/pixel
scanimage: acquiring RGB frame
scanimage: min/max graylevel value = 0/255
scanimage: read 392683200 bytes in total
Closing device

generating a 400mb pnm file.

At 2400 (which should generate a 1.6G file, correct?) it doesn't:

scanimage -vvv --format pnm -x 215.9 -y 279.4 --mode '24bit Color' -d 
'brother4:net1;dev0' --resolution 2400 --source FlatBed -p
scanimage: value for --x is: 215.9
scanimage: value for --y is: 279.4
scanimage: value for --resolution is: 2400
scanimage: rounded value of br-x from 215.9 to 215.88
scanimage: rounded value of br-y from 279.4 to 279.374
scanimage: scanning image of size 19840x26390 pixels at 24 bits/pixel
scanimage: acquiring RGB frame
scanimage: min/max graylevel value = 255/0
scanimage: sane_read: Out of memory
Closing device
Calling sane_exit

The max




More information about the sane-devel mailing list