sane-project-website/old-archive/1999-08/0047.html

134 wiersze
6.2 KiB
HTML

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

<!-- received="Tue Aug 3 23:51:07 1999 PDT" -->
<!-- sent="Wed, 04 Aug 1999 14:58:06 +0800" -->
<!-- name="Steve Gunnell" -->
<!-- email="steveg@ccis.adisys.com.au" -->
<!-- subject="Re: SANE_FRAME Formats (was Re: xsane-0.31 available)" -->
<!-- id="" -->
<!-- inreplyto="SANE_FRAME Formats (was Re: xsane-0.31 available)" -->
<title>sane-devel: Re: SANE_FRAME Formats (was Re: xsane-0.31 available)</title>
<h1>Re: SANE_FRAME Formats (was Re: xsane-0.31 available)</h1>
<b>Steve Gunnell</b> (<a href="mailto:steveg@ccis.adisys.com.au"><i>steveg@ccis.adisys.com.au</i></a>)<br>
<i>Wed, 04 Aug 1999 14:58:06 +0800</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#47">[ date ]</a><a href="index.html#47">[ thread ]</a><a href="subject.html#47">[ subject ]</a><a href="author.html#47">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0048.html">Andreas Rick: "Re: SANE_FRAME Formats (was Re: xsane-0.31 available)"</a>
<li> <b>Previous message:</b> <a href="0046.html">Nick Lamb: "JPEG scanner stuff"</a>
<li> <b>Maybe in reply to:</b> <a href="0019.html">Andreas Rick: "SANE_FRAME Formats (was Re: xsane-0.31 available)"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0048.html">Andreas Rick: "Re: SANE_FRAME Formats (was Re: xsane-0.31 available)"</a>
<!-- reply="end" -->
</ul>
<!-- body="start" -->
Grin. Oliver is very firm in his opinions which is fair enough as he is<br>
doing the work. My judgement would be that SANE_FRAME_RAW<br>
would only ever be used when a new backend is being tested and a<br>
completely untouched data stream is needed for evaluation. Otherwise<br>
why have data formats at all (as you point out)?<br>
<p>
Perhaps the wrong conceptual model is being used here by using<br>
names that poorly model the actual function. Try this model:<br>
<p>
Data Source<br>
V<br>
Source Adapter<br>
V<br>
Translator == Control Source<br>
V<br>
Sink Adapter<br>
V<br>
Data Sink<br>
<p>
Data Sources are Scanners, Digital Cameras, Network Links, and File Readers.<br>
<p>
The Source Adapter translates logical commands from the Control<br>
Source into physical commands sent to the Data Source. It also<br>
passes status information back to the control source. The Source<br>
Adapter also knows what data types the data source can deliver.<br>
Currently mistakenly known as the Back-end.<br>
<p>
The Data Sinks are image programs (like gimp), File Writers,<br>
Printers, Network Links, and Faxes. Or even possibly things like<br>
displays or engraving machines.<br>
<p>
The Sink Adapter handles the logical to physical mapping for control<br>
and data flow between the Control Source and the Data Sink. The<br>
Sink adapter also knows which data types the Sink can accept.<br>
<p>
The Control Source or Translator is where scanimage, xscanimage and<br>
xsane live. It selects which source and sink adapters to use and breaks<br>
out the various Source and Sink logical controls and statuses for the<br>
benifit of the user. A Control source need not have any UI if it can<br>
recieve its control input from the Sink Adapter (like saned). Currently<br>
mistakenly called a Front-end but really a kind of Middle-end.<br>
<p>
Now when a custom data stream needs to be handled the developer<br>
hacks a Source Adapter and a Sink Adapter with a custom<br>
SANE_FRAME_XXX and Oliver doesn't need a total rewrite of<br>
xsane to handle it. Additionally if Oliver wants the IR channel to map<br>
to Gimp Alpha and Nick wants it to map to Layer(IR) we just need<br>
to have two sink adaptors available for GIMP_RGB_ALPHA and<br>
GIMP_RGB_AUX_LAYER.<br>
<p>
*shrug* ymmv<br>
<p>
Steve Gunnell<br>
<p>
Nick Lamb wrote:<br>
<p>
<i>&gt; Am I fighting a losing battle here?</i><br>
<i>&gt;</i><br>
<i>&gt; Why is it so desirable to have</i><br>
<i>&gt;</i><br>
<i>&gt; This..... Instead of this...</i><br>
<i>&gt;</i><br>
<i>&gt; SANE_FRAME_RAW SANE_FRAME_G3</i><br>
<i>&gt; SANE_FRAME_RAW SANE_FRAME_G4</i><br>
<i>&gt; SANE_FRAME_RAW SANE_FRAME_JFIF</i><br>
<i>&gt; SANE_FRAME_RAW SANE_FRAME_RGBI</i><br>
<i>&gt; SANE_FRAME_RAW SANE_FRAME_TEXT</i><br>
<i>&gt;</i><br>
<i>&gt; How about...</i><br>
<i>&gt;</i><br>
<i>&gt; SANE_FRAME_RAW SANE_FRAME_RGB</i><br>
<i>&gt; SANE_FRAME_RAW SANE_FRAME_GREY</i><br>
<i>&gt; SANE_FRAME_RAW SANE_FRAME_BLUE</i><br>
<i>&gt;</i><br>
<i>&gt; Under what circumstances is it preferable NOT to know what kind of data</i><br>
<i>&gt; we are dealing with? Are default: labels in switch blocks suddenly being</i><br>
<i>&gt; taxed by the US government?</i><br>
<i>&gt;</i><br>
<i>&gt; Maybe I'm being REALLY REALLY STUPID here, but I can't see any down side</i><br>
<i>&gt; to knowing what the **** was in the data stream before someone like</i><br>
<i>&gt; Oliver decides to turn it into a JPEG and save it in a file.</i><br>
<i>&gt;</i><br>
<i>&gt; If you have some genuinely unexplained data, which can't be classified,</i><br>
<i>&gt; what makes you think anyone wants to process it anyway?</i><br>
<i>&gt;</i><br>
<i>&gt; Nick.</i><br>
<i>&gt;</i><br>
<i>&gt; --</i><br>
<i>&gt; Source code, list archive, and docs: <a href="http://www.mostang.com/sane/">http://www.mostang.com/sane/</a></i><br>
<i>&gt; To unsubscribe: echo unsubscribe sane-devel | mail <a href="mailto:majordomo@mostang.com">majordomo@mostang.com</a></i><br>
<p>
<p>
<p>
<p>
<pre>
--
Source code, list archive, and docs: <a href="http://www.mostang.com/sane/">http://www.mostang.com/sane/</a>
To unsubscribe: echo unsubscribe sane-devel | mail <a href="mailto:majordomo@mostang.com">majordomo@mostang.com</a>
</pre>
<!-- body="end" -->
<p>
<ul>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0048.html">Andreas Rick: "Re: SANE_FRAME Formats (was Re: xsane-0.31 available)"</a>
<li> <b>Previous message:</b> <a href="0046.html">Nick Lamb: "JPEG scanner stuff"</a>
<li> <b>Maybe in reply to:</b> <a href="0019.html">Andreas Rick: "SANE_FRAME Formats (was Re: xsane-0.31 available)"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0048.html">Andreas Rick: "Re: SANE_FRAME Formats (was Re: xsane-0.31 available)"</a>
<!-- reply="end" -->
</ul>