<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=us-ascii" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Thanks,<br>
Henning Meier-Geinitz wrote:
<blockquote cite="mid20051015102216.GA26917@meier-geinitz.de"
type="cite">
<pre wrap="">Hi,
On Fri, Oct 14, 2005 at 12:20:44AM -0400, Fred Odendaal wrote:
</pre>
<blockquote type="cite">
<pre wrap="">The SANE API defines the sane_control_option as:
SANE_Status sane_control_option (SANE_Handle h, SANE_Int n,
SANE_Action a, void *v,
SANE_Int * i);
Where the argument i is used to convey information back to the frontend.
How do I tell the front end to reload options (SANE_INFO_RELOAD_OPTIONS)
when it supplies a null argument for i?
</pre>
</blockquote>
<pre wrap=""><!---->
You can't. If the frontend send NULL, it's not interested in reloading
the options.
</pre>
</blockquote>
That's what I thought, but I wanted to make sure there wasn't some
undocumented "back door".<br>
<blockquote cite="mid20051015102216.GA26917@meier-geinitz.de"
type="cite">
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap="">I want to have the user set the y resolution and have the x resolution
automatically update correspondingly. This works for xscanimage, but
not xsane.
</pre>
</blockquote>
<pre wrap=""><!---->
I'm a bit surprised that xsane send NULL. Are you sure that his is the
case? At least for the "normal" options it honors reload requests.
</pre>
</blockquote>
Yes, I'm also quite surprised. It works fine with xscanimage, but
doesn't when I use xsane. So I compared the debug output.<br>
<br>
xscanimage:<br>
[lexmark] sane_get_option_descriptor: handle=0x9625108, option = 3<br>
[lexmark] sane_control_option: handle=0x9625108, opt=3, act=1,
val=0xbff19b84, info=0xbff19a4c<br>
<br>
xsane:<br>
[lexmark] sane_get_option_descriptor: handle=0x95f2a80, option = 3<br>
[lexmark] sane_get_option_descriptor: handle=0x95f2a80, option = 3<br>
[lexmark] sane_control_option: handle=0x95f2a80, opt=3, act=1,
val=0xbfeda2fc, info=(nil)<br>
<blockquote cite="mid20051015102216.GA26917@meier-geinitz.de"
type="cite">
<pre wrap="">
If the x resolution directly depends on y, can't you just use one
resolution (option "resolution") and set the other one in the backend
accordingly?
</pre>
</blockquote>
Yes. I just wanted the user to know that when he set 1200dpi the actual
resolution is 600x1200 as you've shown for the gt68xx backend below.<br>
<blockquote cite="mid20051015102216.GA26917@meier-geinitz.de"
type="cite">
<pre wrap="">
Typically "resolution" means "X resolution". E.g. for most scanners
supported by the gt68xx backend you can select these resolutions:
Resolution X Y
100 100 100
300 300 300
600 600 600
1200 600 1200
So only one resolution is selected by the frontend and the backend
decides which X and Y resolutions it uses.
</pre>
</blockquote>
Does the gt68xx backend report back the true x and y resolutions to the
front end so the user know what he is getting? Or, is this just
described in the man page or other documentation?<br>
<br>
regards,<br>
Fred <br>
</body>
</html>