a priori image dimensions

Gordon Matzigkeit (gord@m-tech.ab.ca)
26 May 1997 09:44:37 -0600

Hi!

Here's question for the list before I spend the time to download
sane-0.57...

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?

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.

Maybe space for the PNM header could be reserved before the raw data
is written, such as:

-----
PX
# SANE data follows
# [reserved space, as many bytes as seems appropriate]
[raw data]
-----

Then, this could be transformed into a correct PNM header after the
raw scanner data had been written.

Comments?

-- 
  Gord Matzigkeit   | Proudly running pieces of the GNU operating system.
 gord@m-tech.ab.ca  |  Jacques Cousteau loved programming in assembler.

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