[sane-devel] HP5470c scanner nearly working!
Martijn van Oosterhout
kleptog at svana.org
Sat Feb 22 23:25:46 GMT 2003
On Sat, Feb 22, 2003 at 03:54:37PM +0100, Henning Meier-Geinitz wrote:
> Hi,
>
> 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:
int OpaqueHandle;
MyScanner *s = (MyScanner *)OpaqueHandle;
will FAIL on most 64 bit systems. Please use `void *' or better
`SANE_Handle'.
> > 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 level.
>
> 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 <kleptog at svana.org> http://svana.org/kleptog/
> Support bacteria! They're the only culture some people have.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/sane-devel/attachments/20030223/17834bc3/attachment.sig>
More information about the sane-devel
mailing list