kopia lustrzana https://gitlab.com/sane-project/website
118 wiersze
5.2 KiB
HTML
118 wiersze
5.2 KiB
HTML
<!-- received="Tue Oct 20 11:04:37 1998 PDT" -->
|
|
<!-- sent="Tue, 20 Oct 1998 22:02:03 +0200 (MEST)" -->
|
|
<!-- name="becka@rz.uni-duesseldorf.de" -->
|
|
<!-- email="becka@rz.uni-duesseldorf.de" -->
|
|
<!-- subject="Re: your mail" -->
|
|
<!-- id="m0zVhyl-000CEkC@hades.beck-sw.de" -->
|
|
<!-- inreplyto="199810200110.UAA08128@dfw-ix16.ix.netcom.com" -->
|
|
<title>sane-devel: Re: your mail</title>
|
|
<h1>Re: your mail</h1>
|
|
<a href="mailto:becka@rz.uni-duesseldorf.de"><i>becka@rz.uni-duesseldorf.de</i></a><br>
|
|
<i>Tue, 20 Oct 1998 22:02:03 +0200 (MEST)</i>
|
|
<p>
|
|
<ul>
|
|
<li> <b>Messages sorted by:</b> <a href="date.html#214">[ date ]</a><a href="index.html#214">[ thread ]</a><a href="subject.html#214">[ subject ]</a><a href="author.html#214">[ author ]</a>
|
|
<!-- next="start" -->
|
|
<li> <b>Next message:</b> <a href="0215.html">Dr. Andreas Bolsch: "Pixels vs. Bytes per Line"</a>
|
|
<li> <b>Previous message:</b> <a href="0213.html">Thomas Kluge: "Casio QV-11"</a>
|
|
<li> <b>In reply to:</b> <a href="0212.html">jbnivoit@ix.netcom.com: "(no subject)"</a>
|
|
<!-- nextthread="start" -->
|
|
<li> <b>Next in thread:</b> <a href="0217.html">Jean-Baptiste Nivoit: "Re: your mail"</a>
|
|
<li> <b>Reply:</b> <a href="0217.html">Jean-Baptiste Nivoit: "Re: your mail"</a>
|
|
<!-- reply="end" -->
|
|
</ul>
|
|
<!-- body="start" -->
|
|
Hi !<br>
|
|
<p>
|
|
<i>> i just purchased a Casio QV-11 camera the other day and got</i><br>
|
|
<p>
|
|
<i>> load CAM pictures directly into the GIMP). Now i think i read in the </i><br>
|
|
<i>> SANE doc that JPEG was not supported yet... i don't see the point of</i><br>
|
|
<i>> translating a JPEG file into a bitmap that SANE can handle, since most</i><br>
|
|
<i>> often users might convert the result to JPEG in the end anyway..</i><br>
|
|
<p>
|
|
Yes. If it hasn't been removed, there was an entry in the "TODO" file<br>
|
|
or something that stated that for a while.<br>
|
|
Oh - just found it again in "LEVEL2".<br>
|
|
<p>
|
|
BTW: David - could you correct my EMail address in there ?<br>
|
|
The one stated there isn't valid on the internet, just within my intranet.<br>
|
|
<a href="mailto:becka@ggi-project.org">becka@ggi-project.org</a> is.<br>
|
|
<p>
|
|
<i>> So here are basically the questions:</i><br>
|
|
<i>> - how hard is it to write a backend? what's a good place to</i><br>
|
|
<i>> start (which one is the simplest ?) ?</i><br>
|
|
<p>
|
|
I once wrote the pnm backend to serve as some kind of reference<br>
|
|
implementation. In your case, this might be a good place to start, as<br>
|
|
effectively the camera is more like an "external image library" than like<br>
|
|
a scanner, so it does make sense to start from the pnm backend.<br>
|
|
<p>
|
|
I'd say it isn't too hard, if you have the actual communications code.<br>
|
|
The SANE interface itself is pretty simple, once you have grasped how<br>
|
|
this option stuff works.<br>
|
|
<p>
|
|
<i>> - when will there be JPEG support in the SANE interface? i guess</i><br>
|
|
<i>> other camera (such as the Kodak ones?) also use a format</i><br>
|
|
<i>> that's close to JPEG...</i><br>
|
|
<p>
|
|
We should finally add that.<br>
|
|
<p>
|
|
My idea about adding it would be to increase the version number, which<br>
|
|
can be queried at sane_init() time.<br>
|
|
<p>
|
|
If the frontend finds a sufficiently high version, it would assume<br>
|
|
that the SANE_Parameters struct is extended by a few fields like:<br>
|
|
<p>
|
|
SANE_String mime_type;<br>
|
|
SANE_String suggested_filename;<br>
|
|
<p>
|
|
This would effectively take care of all possible fileformats.<br>
|
|
<p>
|
|
The frontend code would have to be changed a bit like this:<br>
|
|
<p>
|
|
if (strcmp(param.mimetype,"application/SANE"))<br>
|
|
save_directly_to_file(<br>
|
|
make_path_suitable_for_host_os(<br>
|
|
param.suggested_filename)));<br>
|
|
else <br>
|
|
do_the_same_as_before();<br>
|
|
<p>
|
|
This would also take care of the second suggestion in the file to use SANE<br>
|
|
for arbitrary datatypes.<br>
|
|
<p>
|
|
File size could be handled in a compatible way, by setting bytes_per_line<br>
|
|
and lines accordingly, that is usually to something like fsize(),1 or<br>
|
|
1,fsize().<br>
|
|
<p>
|
|
This would only be a minor modification to frontends and backends<br>
|
|
(even old frontends would handle new-style data somewhat correctly, <br>
|
|
if they would save it to a file directly without trying to convert/<br>
|
|
interpret it first). Most of our current front-ends afaik do a very<br>
|
|
simplistic "convert to pnm" which could easily be undone afterwards <br>
|
|
by a small script that simply removes the header.<br>
|
|
<p>
|
|
CU, Andy<br>
|
|
<p>
|
|
<pre>
|
|
--
|
|
= Andreas Beck | Email : <<a href="mailto:andreas.beck@ggi-project.org">andreas.beck@ggi-project.org</a>> =
|
|
<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="0215.html">Dr. Andreas Bolsch: "Pixels vs. Bytes per Line"</a>
|
|
<li> <b>Previous message:</b> <a href="0213.html">Thomas Kluge: "Casio QV-11"</a>
|
|
<li> <b>In reply to:</b> <a href="0212.html">jbnivoit@ix.netcom.com: "(no subject)"</a>
|
|
<!-- nextthread="start" -->
|
|
<li> <b>Next in thread:</b> <a href="0217.html">Jean-Baptiste Nivoit: "Re: your mail"</a>
|
|
<li> <b>Reply:</b> <a href="0217.html">Jean-Baptiste Nivoit: "Re: your mail"</a>
|
|
<!-- reply="end" -->
|
|
</ul>
|