sane-project-website/old-archive/2001-05/0053.html

143 wiersze
6.2 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>sane-devel: Re: SANE API &amp; file format</TITLE>
<META NAME="Author" CONTENT="Stephen Williams (steve@icarus.com)">
<META NAME="Subject" CONTENT="Re: SANE API &amp; file format">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Re: SANE API &amp; file format</H1>
<!-- received="Thu May 3 13:33:15 2001" -->
<!-- isoreceived="20010503203315" -->
<!-- sent="Thu, 03 May 2001 13:42:38 -0700" -->
<!-- isosent="20010503204238" -->
<!-- name="Stephen Williams" -->
<!-- email="steve@icarus.com" -->
<!-- subject="Re: SANE API &amp; file format" -->
<!-- id="200105032042.f43Kgdt04394@icarus.com" -->
<!-- inreplyto="20010503215942.D30124@vortex.swb.de" -->
<STRONG>From:</STRONG> Stephen Williams (<A HREF="mailto:steve@icarus.com?Subject=Re:%20SANE%20API%20&amp;%20file%20format&In-Reply-To=&lt;200105032042.f43Kgdt04394@icarus.com&gt;"><EM>steve@icarus.com</EM></A>)<BR>
<STRONG>Date:</STRONG> Thu May 03 2001 - 13:42:38 PDT
<P>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0054.html">Henning Meier-Geinitz: "Re: Canon backend"</A>
<UL>
<LI><STRONG>Previous message:</STRONG> <A HREF="0052.html">EdHamrick@aol.com: "Re: HP 7400c info / Minolta Scan Dual II"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0050.html">Henning Meier-Geinitz: "Re: SANE API &amp; file format"</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0055.html">Nick Lamb: "Re: SANE API &amp; file format"</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0055.html">Nick Lamb: "Re: SANE API &amp; file format"</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0056.html">Oliver Rauch: "Re: SANE API &amp; file format"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#53">[ date ]</A>
<A HREF="index.html#53">[ thread ]</A>
<A HREF="subject.html#53">[ subject ]</A>
<A HREF="author.html#53">[ author ]</A>
</UL>
<HR NOSHADE><P>
<!-- body="start" -->
<P>
<A HREF="mailto:henning@meier-geinitz.de?Subject=Re:%20SANE%20API%20&amp;%20file%20format&In-Reply-To=&lt;200105032042.f43Kgdt04394@icarus.com&gt;">henning@meier-geinitz.de</A> said:
<BR>
<EM>&gt; So somebody must go on and write an new standard for SANE 2 (see
</EM><BR>
<EM>&gt; LEVEL2 in SANE distribution).
</EM><BR>
<P>Here are some ramblings on the matter. It doesn't seem all that
<BR>
hard...
<BR>
<P>The problem is that a JFIF stream (for example) does not sit well
<BR>
with the SANE_Parameters structure. In particular, the pixels_per_line
<BR>
and bytes_per_line values are not defines.
<BR>
<P>I suppose the right thing to do is simply ignore these for all but the
<BR>
5 core frame format types.
<BR>
<P>Other then that, supporting new formats should be easy and backwards
<BR>
compatible. Just create a well-known-type &quot;transfer-type&quot; with the
<BR>
default always set to TRANSFER_TYPE_SANE that acts like the existing
<BR>
in-memory transfer. Existing tools that are not aware of transfer types
<BR>
will automatically get this. A scanner driver that only supports the
<BR>
TRANSFER_TYPE_SANE type need not even implement type type.
<BR>
<P>If an application is aware of transfer types, it can ask the driver
<BR>
for the word list constraint to get a list of the transfer types that
<BR>
the driver supports. If the driver does not support &quot;transfer-type&quot;
<BR>
then the application supports TRANSFER_TYPE_SANE.
<BR>
<P>If the driver supports &quot;transfer-type&quot;, then the list includes
<BR>
TRANSFER_TYPE_SANE and any other formats it supports, which should
<BR>
at least include TRANSFER_TYPE_JFIF and others that hardware can
<BR>
produce. The application can then compare the list of formats that
<BR>
the driver supports along with its own (implicit) list of supported
<BR>
types, then do whatever seems natural for the application with the
<BR>
types. For example, scanimage_ex may choose to support JFIF images
<BR>
by writing them to a file foo.jpg.
<BR>
<P>Most formats will be variable size streams. To account for that, the
<BR>
application should always read to the EOF to get everything that is
<BR>
the format.
<BR>
<PRE>
--
Steve Williams &quot;The woods are lovely, dark and deep.
<A HREF="mailto:steve@icarus.com?Subject=Re:%20SANE%20API%20&amp;%20file%20format&In-Reply-To=&lt;200105032042.f43Kgdt04394@icarus.com&gt;">steve@icarus.com</A> But I have promises to keep,
<A HREF="mailto:steve@picturel.com?Subject=Re:%20SANE%20API%20&amp;%20file%20format&In-Reply-To=&lt;200105032042.f43Kgdt04394@icarus.com&gt;">steve@picturel.com</A> and lines to code before I sleep,
<A HREF="http://www.picturel.com">http://www.picturel.com</A> And lines to code before I sleep.&quot;
<P><P><P>--
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?Subject=Re:%20SANE%20API%20&amp;%20file%20format&In-Reply-To=&lt;200105032042.f43Kgdt04394@icarus.com&gt;">majordomo@mostang.com</A>
</PRE>
<P><!-- body="end" -->
<HR NOSHADE>
<UL>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0054.html">Henning Meier-Geinitz: "Re: Canon backend"</A>
<LI><STRONG>Previous message:</STRONG> <A HREF="0052.html">EdHamrick@aol.com: "Re: HP 7400c info / Minolta Scan Dual II"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0050.html">Henning Meier-Geinitz: "Re: SANE API &amp; file format"</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0055.html">Nick Lamb: "Re: SANE API &amp; file format"</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0055.html">Nick Lamb: "Re: SANE API &amp; file format"</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0056.html">Oliver Rauch: "Re: SANE API &amp; file format"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#53">[ date ]</A>
<A HREF="index.html#53">[ thread ]</A>
<A HREF="subject.html#53">[ subject ]</A>
<A HREF="author.html#53">[ author ]</A>
</UL>
<!-- trailer="footer" -->
<HR NOSHADE>
<P>
<SMALL>
<EM>
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
: <EM>Thu May 03 2001 - 13:34:26 PDT</EM>
</EM>
</SMALL>
</BODY>
</HTML>