[sane-devel] Many questions: JPEG-Compressed scan; public or password login; Error messages; Scanner HDD access

Reinhold Kainhofer reinhold at kainhofer.com
Wed Oct 5 15:23:43 UTC 2011


I'm currently trying to write a backend for Konica minolta bizhub 
copiers/scanners (via TCP/IP). I have basically decoded the protocol:
http://wiki.kainhofer.com/hardware/bizhub_scan

Now, I have several issues concerning how to implement things in the backend:

1) The device supports user login, public login or completely free access.
It's clear how I can request a user/password if that is required. However, the 
device I have at hand allows public access and optional password-protected 
access. How can I let the user decide whether to use public access or 
password-protected access? I'm attaching a screenshot of the corresponding 
part of the windows TWAIN driver.


2) The device offers JPEG compression for grayscale and color scans, while 
SANE so far only supports uncompressed RGB frames (which means that at 600dpi, 
it will require up to 200MB of network traffic and RAM). What is the 
recommended way to decompress the JPEG data? Link to libjpeg and use that? Or 
is there some built-in code (afaics, sanei_jpeg.h is about creating jpeg 
files, right?).
Most backends simply seem to disallow any compression if SANE_FRAME_JPEG is 
not defined, which I don't like because sending the uncompressed data is 
really a waste of bandwidth and it takes quite a while.


3) How can I get some custom error message to the front end? In particular, 
the device will refuse to scan from FBF if there is some paper in the ADF. 
(The reverse is easy, because the is SANE_STATUS_NO_DOCS to indicate that the 
scanner expects paper in the ADF) How can I tell the user that he can't scan 
from FBF if the ADF is loaded? SANE_STATUS_INVAL does not give the user any 
clue what's wrong...



4) The device supports Paper discoloration or Background removal, both with a 
setting of either "Auto" or a numeric values -6...+2 (see attached 
screenshot). It seems that the proper way to implement this for an option is 
to use a Range {-6, 2, 1} and capabilities with SANE_CAP_AUTOMATIC. This 
really adds a checkbox in xsane to use either automatic or the manually given 
numeric value.
However, I don't find a way to set the default to automatic...



5) The scanners also have a HDD installed, where one can store scans on the 
disk and later retrieve them via the network (again, it's the same SCL-based 
protocol like real scans). It basically works by logging in as a user, then 
selecting a box and then selecting an image in that box. You can then download 
that image just like you would really scan it. 
How can I implement this as a sane backend (in particular the box+image 
selection part)? Any ideas?


Thanks,
Reinhold
-- 
------------------------------------------------------------------
Reinhold Kainhofer, reinhold at kainhofer.com, http://reinhold.kainhofer.com/
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Login_Dialog_WindowsTWAIN.jpg
Type: image/jpeg
Size: 17322 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20111005/72528863/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ExtendedSettingsDialog_AutoOrNumericValue.jpg
Type: image/jpeg
Size: 18062 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20111005/72528863/attachment-0003.jpg>


More information about the sane-devel mailing list