[sane-devel] Bug in snapscan or sane network protocolo?
Giuseppe Sacco
giuseppe@eppesuigoccas.homedns.org
Thu, 09 Jun 2005 23:58:43 +0200
Il giorno gio, 09-06-2005 alle 19:50 +0200, Henning Meier-Geinitz ha
scritto:
> Hi,
>
> On Thu, Jun 09, 2005 at 04:47:05PM +0200, Giuseppe Sacco wrote:
> > Basically I do a scan of 210.0x297.0mm, using a 200dpi resolution.
> > Prior to scan I call get_parameters and receive an *estimated* values
> > for lines, pixelsperline, bytesperline; after receiving this data I
> > receive the frame data.
>
> Which frontend do you use?
I am using a java application. I use jsane as SANE library.
>From a client side point of view, we do:
1. device open
2. set all options
3. get frame:
3.1 get parameters
3.2 start
3.3 download all frames
4. compose image using frames
> > while, when scanning, I get a different amount of data:
>
> This is perfectly legal (see SANE standard). The normal way is:
>
> sane_get_parameters (returns estimated values)
> sane_start
> sane_get_parameters (returns exact parameters)
> --> malloc memory for image, ...
Is this possible?
> > I see two possible options:
> >
> > 1. Change the snapscan algorithm to have better supposed values
>
> If snapscan doesn't return the correct parameters after sane_start,
> it's broken. But I'd be very surprised if that were the case as that
> would break all frontends.
>
> > 2. Change the sane network protocol in order to get all corrected
> > parameter *with* or *after* the scanned data.
>
> I haven't checked that but you can get the parameters after running
> sane_start, can't you?
I don't know. I will try it tomorrow.
Thanks for all comments,
Giuseppe