[sane-devel] HP5470c scanner nearly working!
Martijn van Oosterhout
Martijn van Oosterhout <email@example.com>
Sun, 23 Feb 2003 10:25:46 +1100
Content-Type: text/plain; charset=us-ascii
On Sat, Feb 22, 2003 at 03:54:37PM +0100, Henning Meier-Geinitz wrote:
> On Sun, Feb 23, 2003 at 12:58:56AM +1100, Martijn van Oosterhout wrote:
> It's called the "SANE Standard" or "Programmer's Manual". It can be
> found on the documentation page: http://www.mostang.com/sane/docs.html
> Some tips are also in doc/backend-writing.txt. E.g. for writing
> portable code.
Thanks, I found them. I'm reading them now. Actually, I have one addition
for the backend-writing.txt
* Please do not assume that `void *' has the same size as `int'. On some
systems, it's `long' and the size of this type may be bigger than that of
an int (this is true for practially any of the 64-bit systems). Where this
comes up is with opaque handles. For example:
MyScanner *s =3D (MyScanner *)OpaqueHandle;
will FAIL on most 64 bit systems. Please use `void *' or better
> > Can I safely assume the caller of sane_read will provide a buffer >10K.
> > Probably not hey? So I have to buffer possibly down to the subpixel lev=
> No. The buffer can be as low as 1 byte. In backends that need to do
> image manipulation, usually a buffer of one or multiple scan lines is
> used. Especially if you need to do line distance correction (CCD
> scanners), you may need 10 or more lines of each color.
Heh. I wonder if all backends really support a buffer that small. Nice
stress test :)
Martijn van Oosterhout <firstname.lastname@example.org> http://svana.org/kleptog/
> Support bacteria! They're the only culture some people have.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
-----END PGP SIGNATURE-----