[sane-devel] SANE_Handle question
Sun, 19 Sep 2004 12:44:38 +0100
> > I'm trying to implement using SANE within Scribus and I'm hitting a
> > small snag. While the majority of the API is really simple to use, I'm
> > having a problem with what SANE_Handle is.
> Its great to hear that Scribus will support Sane.
Still lots to do and a decision as to how much the support will be. Do I
have it so that the scanner scans the image and then let GIMP deal with
the rest or have a very basic area select mechanism? I'm happier to send
things to GIMP, but then I'm lazy ;-p
> > There are plenty of functions which require SANE_Handle, but nothing
> > which actually sets it!
> Well, there is a function which sets a SANE_Handle variable:
> SANE_Status sane_open (SANE_String_Const name, SANE_Handle * h);
> But it's easy to miss (or forget) this function while reading the docs=20
> -- that could have had easily happened for me too ;)
Actually, I didn't miss it, just it didn't register with me for some
reason. I'm guessing that I spend way too much time doing C++ and C#
> > How should I set the handle? For instance, when I obtain the device
> > list, I have two show for my USB webcam and one for my scanner. I have
> > to be able to set the handle to the scanner. Is it enough to set the
> > handle to the device name or should it be set to the physical /dev/sg0
> > value (which is not a good idea!)
> call sane_get_devices, and use the field SANE_Device.name from the=20
> elements of device_list as the first parameter in the of call sane_open.=20
> Using something like '/dev/sg0' will not work, because Sane does not=20
> know in this case, which backend should be used; 'mustek:/dev/sg0' might=20
I'll give it a spin and see what happens.
Thanks for the tips. I have no doubt I'll be back to ask for more...
Lisa: No, thanks. Do you have any fruit?=20
Homer: This has purple stuff inside. Purple is a fruit.
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)
-----END PGP SIGNATURE-----