[sane-devel] Calculating maxlen

Oliver Rauch Oliver.Rauch@Rauch-Domain.DE
19 Sep 2004 21:52:14 +0200


Hello Paul.

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.

max_len and the size of the buffer are arbitary. The backend must be
able to handle each size from max_len=1 to max_len > size of the image.

Best regards
Oliver

Am Son, 2004-09-19 um 21.38 schrieb Paul:
> Hi,
> 
> Just a small one here.
> 
> I'm using sane_read. handle is fine, but I need to pass a buffer the
> size of maxlen for *data. How do I work out maxlen? Is it simply the
> bytes per line * pixels per line or is it found from sane_get_parameters
> (SANE_Params *params->size)?
> 
> TTFN
> 
> Paul