# Re: a priori image dimensions

becka@sunserver1.rz.uni-duesseldorf.de
Mon, 26 May 1997 19:19:24 +0200 (MET DST)

- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- Next message: Dr. Michael Grimm: "Re: HP support"
- Previous message: David Mosberger-Tang: "Re: a priori image dimensions"

> A problem that I've discovered in my PINT backend is that the
> dimensions (both X and Y) cannot be known until the scan is started.
> I've noticed the following line in the TODO:

> - xscan: scanning of images whose heights is not known a priori is not
> supported yet; this is going to be important for handheld scanners

> Does anybody have ideas on how to implement this, and/or has it been
> done in 0.57?
I don't know, if it has been implemented, but the idea is to read data
until SANE_EOF is returned from the read call.

> The easiest way I can think of is to have a call to
> sane_get_parameters after the scan has completed to find out what
> actually happened.
NO. This would mean buffering the whole image in the SANE driver.
This is not only RAm-consuming, it also prevents transferring the image
as early as possible to show scan progress and do postprocessing.

> Maybe space for the PNM header could be reserved before the raw data ...
> Then, this could be transformed into a correct PNM header after the
> raw scanner data had been written.
Yes. This is how it is intended.

CU,Andy

    --
    Andreas Beck              |  Email :  <becka@sunserver1.rz.uni-duesseldorf.de>

    --
    Source code, list archive, and docs: http://www.azstarnet.com/~axplinux/sane/
    To unsubscribe: mail -s unsubscribe sane-devel-request@listserv.azstarnet.com

     Next message: Dr. Michael Grimm: "Re: HP support"
     Previous message: David Mosberger-Tang: "Re: a priori image dimensions"