Re: Output filters for xscanimage:a simple attempt

David Mosberger-Tang (David.Mosberger@acm.org)
Sat, 21 Nov 1998 16:16:27 -0800

>>>>> On Thu, 19 Nov 1998 09:09:48 +0100 (MET), Stefan Illy <stefan.illy@itp.fzk.de> said:

Stefan> What is the reason for using fseek (and also ftell) in
Stefan> xscanimage.c? Is there a possibility for avoiding this in
Stefan> future releases of sane?

The reason is that three-pass color scanners deliver image data in
band-interleaved format (e.g., all red pixels, followed by all blue
pixels, etc.) whereas most image formats want pixel-interleaved format
(red, green, blue value, followed by next pixel). We use fseek() in
xscanimage to avoid having to buffer the entire image in memory (which
may be huge).

--david

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com