[sane-devel] Many questions: JPEG-Compressed scan; public or password login; Error messages; Scanner HDD access
m. allan noah
kitno455 at gmail.com
Mon Oct 10 15:14:11 UTC 2011
On Wed, Oct 5, 2011 at 11:23 AM, Reinhold Kainhofer
<reinhold at kainhofer.com> wrote:
> 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.
You have not explained what the different levels of access actually
do, so it's hard to suggest a solution.
> 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.
Just because the current sane standard does not allow you to return
jpeg data to the front end, does not mean that you cannot collect jpeg
data from the scanner. Use libjpeg to decompress in the backend. Also
add an option to produce jpeg output if SANE_FRAME_JPEG is defined.
Some day that might be turned on... :(
> 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...
I would returned jammed in that case. Unfortunately you cannot send
custom messages.
> 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...
I have handled similar situations in other backends with two options-
one bool to enable/disable/auto, and a second to set the level. Or, a
single range with one of the values being treated as '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?
This would require a 'scan' to produce a thumbnail page, and then a
second scan with an 'image_number' option, perhaps as a vector. The
gui would have to be custom.
allan
>
>
> 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
>
> --
> sane-devel mailing list: sane-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
> Unsubscribe: Send mail with subject "unsubscribe your_password"
> to sane-devel-request at lists.alioth.debian.org
>
--
"The truth is an offense, but not a sin"
More information about the sane-devel
mailing list