Thanks again for the prompt response.  I have one question:  when you say 
"your scanner breaks", do you mean that my physical scanner would be damaged?  
Or do you mean that the sane backend would be broken and I'd have to revert 
the change?  I'm willing to help get this driver working but I'm not in a 
position to risk damage to the scanner, unfortunately.

I have access to Windows XP, so if that can be of use for reverse-engineering 
the windows driver, I will help that way too.  Only problem is I don't have a 
dev environment in Windows so compiling software will be an issue.

Thanks,

Mark 

On Thursday 16 November 2006 22:45, Olaf Meeuwissen wrote:
> Mark Richards <[email protected]> writes:
> > Hi guys,
> >     Thanks for the quick reply.  Attached is the output of attempting to
> > scan a 4x6 photo a few times at different settings (SANE_DEBUG_EPSON=25).
> >  Note that the out of memory error happens the instant I press the scan
> > button, not part-way through a scan or anything.  The scanner doesn't
> > even twitch.  It previews fine and scans at lower dpi/colour-depth
> > though.
>
> # OK, I see.
> # Somebody sure contributed an ugly hack just to get 4800dpi on the
> # 4990 to work ;-{  The epson backend only uses ESC based commands,
> # which implies that that you can't even set 4800dpi and even less
> # so the scan area you are using and have the device behave.  The
> # hack that went in probably shouldn't have ...
>
> Anyway, you can not scan wider than about 3.4 inches without avoiding
> this behaviour in sane-backends-1.0.18 on Linux.
>
> If you don't mind experimenting, you could try with a larger value for
> MAX_DATA in sanei/sanei_scsi.c but I have absolutely no idea what will
> happen.  In the best case things will "work", in the worst your
> scanner breaks.
>
> Hope this helps,
>
> > Thanks for the help,
> >
> > Mark
> >
> > On Thursday 16 November 2006 18:48, Olaf Meeuwissen wrote:
> >> Gerard Klaver <[email protected]> writes:
> >> > On Thu, 2006-11-16 at 09:13 -0500, Mark Richards wrote:
> >> >> Hi,
> >> >> I have an Epson Perfection Photo 4990 (GT-X800) scanner connected by
> >> >> USB to my PC (Athlon 64 3200 1GB ram 5GB swap, FC5).
> >> >>
> >> >> scanimage --version : scanimage (sane-backends) 1.0.18 ; backend
> >> >> version 1.0.18
> >> >>
> >> >> Scanimage -L : device `epson:libusb:002:009' is a Epson GT-X800
> >> >> flatbed scanner
> >> >>
> >> >> I can scan fine at 1200dpi (16-bit colour) or 2400 (8-bit colour) but
> >> >> when I try to scan at anything higher I get an Out of Memory error.
> >> >> It is my understanding that scanning at 4800dpi should be possible
> >> >> with this scanner.  Any suggestions?
> >> >>
> >> >> Thanks,
> >> >>
> >> >> Mark
> >> >
> >> > With export SANE_DEBUG_EPSON=255
> >>
> >> You don't really want to do that at 4800dpi ;-).  It outputs a single
> >> line for every sample.  Use 25 instead of 255 for more useful output
> >> and mail me a (compressed) debug log.
> >>
> >> > and then start scanimage, check the logs for some info,
> >> >
> >> > For a A4 300dpi (24 bits, 8 bits per color) scan you get about 25Mbyte
> >> > of data, for 600dpi about 100Mbyte, for 1200dpi about 400 Mbyte, for
> >> > 2400dpi about 1600Mbyte.
> >>
> >> Mark mentions 1GB RAM ... if the frontend attempts to keep the whole
> >> scanned image in memory than at 4800dpi, 24bits he may be hitting the
> >> limit.
> >>
> >> Whereabouts does the out of memory occur?  Somewhere right at or near
> >> you start the scan or after you are more than halfway through the
> >> scan?
> >>
> >> Hope this helps,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20061117/19c4fdad/attachment.pgp
From [email protected]  Fri Nov 17 22:29:14 2006
From: [email protected] (Jens Gulden)
Date: Fri Nov 17 22:47:41 2006
Subject: [sane-devel] truncated image data when scanning via network
In-Reply-To: <[email protected]>
References: <[email protected]>
Message-ID: <[email protected]>

Hello,

I wrote on 2006-07-20:
> truncated image files on the client, the data just seems to stop at some 
> fixed number of bytes.

The problem even occurs when scanning via localhost-net, i.e. adding 
"localhost" to 
/etc/sane.d/net.conf and then scan via that. The resulting file is truncated, 
just like when 
scanning via real network:

# scanimage -d "net:localhost:brother:bus1;dev1" --mode "Black & White" 
--resolution 300 > 
test-localhost.pbm

-> file-size 1072633 (too short, truncated)

# scanimage -d "brother:bus1;dev1" --mode "Black & White" --resolution 300 > 
test-dev.pbm

-> file-size 1076353 (ok)

> Both server and client run on Debian packages libsane 1.0.16-4, sane 1.0.14-1 
> and sane-utils 1.0.16-4.
> brscan-0.2.1-0.i386.deb

Is this a problem of the sane versions, or is something wrong with the Brother 
driver?

Thanks for help
Jens


Jens Gulden wrote:
> Hello sane people,
> 
> I have started using saned and network-scanning instead of connecting 
> the scanner/printer locally via USB.
> Unfortunately, the maximum size to scan is 210mm x 293mm for black&white 
> scans, which is almost a full-sized A4 image (210mm x 297mm). Attempts 
> to scan larger sizes strangely result in truncated image files on the 
> client, the data just seems to stop at some fixed number of bytes. 
> Scanning on the server (locally via USB) works fine.
> Examples:
> 
> 'scanimage --mode "Black & White" --resolution 300 -x 210 -y 297 > 
> network_bw_300dpi_210x297.pbm'
> network scanning:
> -y 297 : 1072633 bytes (invalid file)
> -y 295 : 1072633 bytes (invalid file)
> -y 294 : 1072633 bytes (invalid file)
> -y 293 : 1072323 bytes (VALID FILE)
> -y 292 : 1068603 bytes (VALID FILE)
> Data seems to be truncated at 1072633 bytes.
> 
> local scanning on the server:
> -y 297 : 1076353 bytes (valid file) ...
> -y 292 : 1068603 bytes (valid file)
> 
> The same occurs when scanning in grayscale, but at a different number of 
> bytes and a slightly different height in mm:
> 
> 'scanimage --mode "True Gray" --resolution 300 -x 210 -y 297 > 
> network_gray_300dpi_210x297.pgm'
> network scanning:
> -y 297 8531237 bytes (invalid file) ...
> -y 292 8531237 bytes (invalid file)
> -y 291 8518837 bytes (VALID FILE)
> Data seems to be truncated at 8531237 bytes.
> 
> Color scanning seems to always result in invalid files for sizes near A4.
> 
> Is this some known behaviour? I haven't found something like this in the 
> list archive.
> 
> The pnm-headers of the truncated files are ok. There are no error 
> messages in the logs or when running saned -d128. Filling up the missing 
> bytes with zeros leads to files which can at least be opened by e.g. 
> gimp (but with the last rows of pixels being just white, of course).
> 
> The scanner/printer is a Brother MFC3420C connected via USB with the 
> SANE driver delivered by Brother (brscan-0.2.1-0.i386.deb). Both server 
> and client run on Debian packages libsane 1.0.16-4, sane 1.0.14-1 and 
> sane-utils 1.0.16-4.
> 
> It would be great if someone has an idea. Thanks,
> Jens
> 

Reply via email to