[sane-devel] Pixma lamp control

jp at byjp.me jp at byjp.me
Sat Nov 1 09:26:25 GMT 2025


Hello,

I'm interested in driving SANE to scan twice in succession (one with the lamp on, one with the lamp off), so I can scan against a lightbox (with its lamp off, and on, respectively) to manufacture an alpha layer for my scanned image.

(I’m scanning postcards; some have unusually shaped edges, and with examples of every colour touching the edge of the card — my attempts at automating masking with alpha mattes work only some of the time)

I have a Pixma scanner (CanoScan LiDE 400), for which SANE doesn't declare any lamp-related options (with scanimage -A). I’m a software & firmware engineer, so I’m comfortable getting into the detail, but I wanted to learn from the community first:

- I’ve skimmed through the pixma backend code; it looks as though the lamp status is only ever read (and never written). Is anyone aware of a way to set the lamp status (even if currently unimplemented in SANE today) — ie. would the hardware permit this?

- Is there any experience in the SANE dev community around this kind of RGBA style scanning? Are there other recommended approaches? (beyond alpha mattes)

Many thanks,
JP
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/sane-devel/attachments/20251101/b5273b91/attachment.htm>


More information about the sane-devel mailing list