meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:sane [2021/07/08 11:02] niziaklinux:sane [2024/12/15 19:21] (current) niziak
Line 9: Line 9:
   * xscanimage - simple GUI, scans directly to file, not possible to view scanned image   * xscanimage - simple GUI, scans directly to file, not possible to view scanned image
   * simple-scan - perfect to fast scanning of books, etc ,very simple GUI (photo/text) to create multi-pages documents (view of live scan)   * simple-scan - perfect to fast scanning of books, etc ,very simple GUI (photo/text) to create multi-pages documents (view of live scan)
 +    * [[https://gitlab.gnome.org/GNOME/simple-scan|project page]]
     * [-] brightness/contasrt adjustments doesn't work     * [-] brightness/contasrt adjustments doesn't work
   * skanlite - works slowly, performs some USB polling   * skanlite - works slowly, performs some USB polling
Line 24: Line 25:
     * Download and extract udev rules from: [[https://tw.canon/en/support/0100993201/1|ScanGear MP package]]     * Download and extract udev rules from: [[https://tw.canon/en/support/0100993201/1|ScanGear MP package]]
         * rules are inside `CONTENTS.cpio` file         * rules are inside `CONTENTS.cpio` file
 +        * or here: {{ :linux:80-canon_mfp2.rules.gz |}}
     * <code bash>sudo udevadm control --reload-rules</code>     * <code bash>sudo udevadm control --reload-rules</code>
     * <code bash>sudo udevadm trigger --action=add --subsystem-match=usb</code>     * <code bash>sudo udevadm trigger --action=add --subsystem-match=usb</code>
Line 43: Line 45:
  
 ===== sane ===== ===== sane =====
-From sane list, it should be supproted by ''sane-pixma'' driver: Backend: pixma (0.23.0)+ 
 +From sane list, it should be supported by ''sane-pixma'' driver: Backend: pixma (0.23.0) 
 + 
 +[[http://www.sane-project.org/man/sane-pixma.5.html|sane-pixma.5]] 
 + 
 +Move all .conf files from ''/etc/sane.d'' to speedup autodetection. 
 +<code bash> 
 +mkdir /etc/sane.d/OFF 
 +mv /etc/sane.d/*.conf /etc/sane.d/OFF 
 +</code> 
 + 
 +Create new config: 
 +<file ini /etc/sane.d/canon_lide400.conf> 
 +# Autodetect the Canon CanoScan LiDE 400 
 +usb 0x04a9 0x1912 
 +</file>
  
 ==== Build as DEB ==== ==== Build as DEB ====
 +
 +<code bash>apt-get install build-essential fakeroot devscripts</code>
 +
 +=== manual download ===
 +
 +Download source package from [[https://packages.debian.org/unstable/source/sane-backends]]:
 +  * sane-backends_1.0.31-4.dsc
 +  * sane-backends_1.0.31.orig.tar.gz
 +  * sane-backends_1.0.31-4.debian.tar.xz
 +
 +<code bash>
 +dpkg-source -x sane-backends_1.0.31-4.dsc
 +cd sane-backends-1.0.31
 +dpkg-checkbuilddeps
 +sudo mk-build-deps -i
 +# sudo apt-get install libcurl4-gnutls-dev
 +dpkg -i ../sane-backends.deb
 +</code>
 +
 +
 +=== apt source download ===
  
 <code bash> <code bash>
-apt-get install build-essential fakeroot devscripts 
-cd /usr/src 
 apt-get source sane-backends apt-get source sane-backends
-cd sane-backends-1.0.27/+cd sane-backends-1.0.27 
 +</code> 
 + 
 +=== build === 
 + 
 +<code bash>
 apt-get build-dep sane-backends apt-get build-dep sane-backends
 debuild -b -uc -us debuild -b -uc -us
Line 58: Line 99:
  
 ==== Build from source ==== ==== Build from source ====
 +
 Remove files installed by distribution: Remove files installed by distribution:
 <code bash> <code bash>
Line 87: Line 129:
 device `pixma:04A91912' is a CANON CanoScan LiDE 400 multi-function peripheral device `pixma:04A91912' is a CANON CanoScan LiDE 400 multi-function peripheral
 </code> </code>
 +
 +
 +===== gamma adjust =====
 +
 +Scanner backends supports custom gamma table of size 1024 (10bits). Color range is from 0 to 65535.
 +To get raw color scan from scanner:
 +<code bash>
 +scanimage --custom-gamma=yes --gamma-table `gamma4scanimage 1.0 0 1023 1023 65535`  >image.pnm
 +</code>
 +
 +Options are described here: [[http://www.sane-project.org/man/gamma4scanimage.1.html|gamma4scanimage.1]]
 +
 +To get white paper scans:
 +<code bash>scanimage -p --resolution=150 --custom-gamma=yes --gamma-table `gamma4scanimage 1.0 0 700 1023 65535`  >image.pnm</code>
 +
 +
 +
  
 ===== Issues ===== ===== Issues =====