[sane-devel] plustek backend - lamp-switch option

2013-04-19 Thread Gerhard Jäger
Hi,

On Thursday 18 April 2013 22:32:51 Alexander Hofmann wrote:
 Hi,
 
 Am 16.04.2013 08:24, schrieb Gerhard J?ger:
[...]
  Regarding writing a backend, this one could be a starting point
  http://www.sane-project.org/backend-writing.txt
 That one helped me out: I was able to add a new option, dark-scan to
 the plustek backend, that causes the driver to switch of the lampes the
 moment the scan begins. It works like a charm - digitizing old S/W
 negatives works, and so does scanning pictures projected by scanner
 cameras. As the scanner is recording red, green and blue channels one
 by one, color's not possible of course, except with using filters and
 scanning the image thrice, witch might produce some interesting results
 when using IR, I've yet to check that.
 
 If there's interest in the change, I could try to provide a patch,
 although I'm not very familiar of using git...

give it a try and post the patch for review. I'm also not very 
familiar with git, but it's in fact not that hard to learn...

- Gerhard




[sane-devel] plustek backend - lamp-switch option

2013-04-19 Thread Alexander Hofmann
Hi,

Am 19.04.2013 08:09, schrieb Gerhard J?ger:
 [...]
 give it a try and post the patch for review. I'm also not very 
 familiar with git, but it's in fact not that hard to learn...

 - Gerhard


Done, I think. I had downloaded the latest stable version (1.0.23) as
tar-ball and not via git, which didn't easy up the task, but it's not a
big change anyway...

The diff is on pastebin: http://pastebin.com/S46jBi36

Looking forward to your comments ;-)

-- Alexander

-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20130419/a812ac5c/attachment.pgp


[sane-devel] plustek backend - lamp-switch option

2013-04-18 Thread Alexander Hofmann
Hi,

Am 16.04.2013 08:24, schrieb Gerhard J?ger:
 Hi,

 On Sunday 14 April 2013 16:03:49 Alexander Hofmann wrote:
 [...]
 Does that mean that the scanner supports scanning with the lamps off?
 (e.g. to scan negatives)?
 no. Switching the lamps while scanning is performed by the backend.
Indeed, I located the code (calls to usb_LampOn in plustek-usb.c)...


 If so, how should I use that option?
 This option is available to provide a way for a possible frontend
 like XSane for switching on or off the lamp manually for example
 before doing a scan. Could be interesting when skipping the warmup
 option - which is in fact only useful for CCD based scanner that
 hav a CCFL lamp.
Ok, so not what I was searching for. Switching lamps off and on during
scans/calibration steps when using CCFL tubes might not be the best idea
either...

 Regarding writing a backend, this one could be a starting point
 http://www.sane-project.org/backend-writing.txt
That one helped me out: I was able to add a new option, dark-scan to
the plustek backend, that causes the driver to switch of the lampes the
moment the scan begins. It works like a charm - digitizing old S/W
negatives works, and so does scanning pictures projected by scanner
cameras. As the scanner is recording red, green and blue channels one
by one, color's not possible of course, except with using filters and
scanning the image thrice, witch might produce some interesting results
when using IR, I've yet to check that.


If there's interest in the change, I could try to provide a patch,
although I'm not very familiar of using git...

Thanks for the help,

Alexander


-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20130418/c724d345/attachment.pgp


[sane-devel] plustek backend - lamp-switch option

2013-04-16 Thread Gerhard Jäger
Hi,

On Sunday 14 April 2013 16:03:49 Alexander Hofmann wrote:
[...]
 I'm currently playing around with the SANE API. When listing all options
 available for my scanner (Canon N670U a.k.a LiDE 20) I noticed an option
 called lamp-switch. It provides a description saying it's for
 Manually switching the lamp(s)..
 
 Does that mean that the scanner supports scanning with the lamps off?
 (e.g. to scan negatives)?

no. Switching the lamps while scanning is performed by the backend.

 If so, how should I use that option?

This option is available to provide a way for a possible frontend
like XSane for switching on or off the lamp manually for example
before doing a scan. Could be interesting when skipping the warmup
option - which is in fact only useful for CCD based scanner that
hav a CCFL lamp.

 I tried setting it to 1 just bevore starting the scan, but I didn't see
 any changes.
 
 Also, is there any comprehensive documentation about the various options
 each backand provieds? I checked the manpages, but the lamp-switch
 option doesn't seem to be documented there.

You are right. It's in fact not documented, either because I was too
lazy - or it is not useful for command line scanning.

Please don't stick on the lamp-switch option. This one is only provided
by the plustek backend. 

Regarding writing a backend, this one could be a starting point
http://www.sane-project.org/backend-writing.txt

Having a look at the test backend as well.

File include/saneopts.h provides commonly used options, but in
fact it's up to the backend to define which option it provides.

- Gerhard



[sane-devel] plustek backend - lamp-switch option

2013-04-14 Thread Alexander Hofmann
Hi, there.

I'm currently playing around with the SANE API. When listing all options
available for my scanner (Canon N670U a.k.a LiDE 20) I noticed an option
called lamp-switch. It provides a description saying it's for
Manually switching the lamp(s)..

Does that mean that the scanner supports scanning with the lamps off?
(e.g. to scan negatives)?

If so, how should I use that option?

I tried setting it to 1 just bevore starting the scan, but I didn't see
any changes.

Also, is there any comprehensive documentation about the various options
each backand provieds? I checked the manpages, but the lamp-switch
option doesn't seem to be documented there.

Thanks in advance,

Alexander Hofmann

-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 268 bytes
Desc: OpenPGP digital signature
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20130414/b6e97b92/attachment.pgp