[sane-devel] Calculating maxlen

Paul paul@all-the-johnsons.co.uk
Sun, 19 Sep 2004 21:06:06 +0100


--=-X2JfoKz2QG0ksGE+DK3H
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hi,

> max_len is set by the frontend. The buffer is allocated by the frontend
> and the size of the buffer must be at least max_len bytes.
>=20
> max_len and the size of the buffer are arbitary. The backend must be
> able to handle each size from max_len=3D1 to max_len > size of the image.

Okay, I need to be clear here.

max_len is some size large enough to scan something in. How do I know
how big to make this to (say) scan an A4 picture at 8bpp resolution? To
me, it looks like I multiply bytes_per_line * pixels_per_line * lines *
depth to accomodate everything.

I'm currently toying with the code so I know what has to be done when it
comes to implementing the code for real.

TTFN

Paul
--=20
Homer: Donut?=20
Lisa: No, thanks. Do you have any fruit?=20
Homer: This has purple stuff inside. Purple is a fruit.

--=-X2JfoKz2QG0ksGE+DK3H
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQBBTeauusSVe5EZv3wRAvoMAKCHwi6wgVbyFH07udD0WhrHfurZhQCfSMRK
aSorSFwaCDufYDyD6HJzFfw=
=S9gG
-----END PGP SIGNATURE-----

--=-X2JfoKz2QG0ksGE+DK3H--