don't respect document type changes

Bug #494754 reported by Sebastien Bacher
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Simple Scan
Fix Released
Medium
Unassigned

Bug Description

* run simple-scan 0.7
* select the document type "photo"
* click on the scan button
* select the document type "text"
* click on the scan button

the second scan is done in photo quality

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Works for me - what happens when you scan using text from startup?

Changed in simple-scan:
status: New → Incomplete
Revision history for this message
Robert Ancell (robert-ancell) wrote :

My guess is your scanner doesn't support "LineArt" mode - can you run simple-scan -d and paste the results in?

Revision history for this message
Sebastien Bacher (seb128) wrote :

it's possible but I don't have access to the device now so it might have to wait a bit to get the information

Revision history for this message
staedtler-przyborski (staedtler-przyborski-deactivatedaccount) wrote :

The situation is even worse.

Whatever settings (color, line-art, DPI size ...) you have in simple-scan, there will be scanners out there which don't support at least one of those settings.

Possible solutions:

1. Decide the scanner/sane is crap/inconsistent (yes sane is inconsistent) and ignore the bug.

2. Make every scan setting user adjustable. But this would mean that every user has first to query 'scanimage -h' to fiddle out the required settings.

3. Have a database with scanners and the corresponding settings. But this would mean that users have to provide the required settings (unless you have a scanner park with all scanners spread over the world).

Revision history for this message
staedtler-przyborski (staedtler-przyborski-deactivatedaccount) wrote :

I've thought further on how to solve this in a 'simple' manner...

Best would be to deliver 'simple-scan' with some useful settings (means which works with most scanners), but make the settings adjustable via 'gconf', so users have the possibility to change these according to their (scanners) needs.

Naturally those who are in the unlucky mood have to use 'scanimage -h' first to get the required settings, but maybe they are keen enough to send them back, so 'simple-scan' could have them in it's documentation.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

I don't see these as big issues:
- If your scanner doesn't support the requested DPI then the largest possible is used
- If your scanner doesn't support color then grayscale is used (which will not suprise the user as they surely know their scanner doesn't do color)
- If your scanner doesn't do LineArt, then we just need to post-process the image so it looks similar to LineArt.

My assumption is the vast majority of consumer scanners out there will support all 3, if not, you need to use xsane or similar.

Revision history for this message
staedtler-przyborski (staedtler-przyborski-deactivatedaccount) wrote :
Download full text (5.4 KiB)

>My assumption is the vast majority of consumer scanners out there will support all 3

Really ?

My scanner is an Epson V100 (and there are lots of epson scanners used under linux, due to it's good support) and the sane epson-backend doesn't support line-art (als I've written sane is inconsistent, binary would be the right parameter with epson-scanners to get black&white)

'Just for fun' my output of scanimage -h

Options specific to device `epkowa:interpreter:002:006':
  Scan Mode:
    --mode Binary|Gray|Color [Color]
        Selects the scan mode (e.g., lineart, monochrome, or color).
    --depth 8|16 [8]
        Number of bits per sample, typical values are 1 for "line-art" and 8
        for multibit scans.
    --halftoning None|Halftone A (Hard Tone)|Halftone B (Soft Tone)|Halftone C (Net Screen) [inactive]
        Selects the halftone.
    --dropout None|Red|Green|Blue [inactive]
        Selects the dropout.
    --brightness 0..0 [inactive]
        Selects the brightness.
    --sharpness -2..2 [inactive]

    --gamma-correction User defined (Gamma=1.0)|User defined (Gamma=1.8) [User defined (Gamma=1.8)]
        Selects the gamma correction value from a list of pre-defined devices
        or the user defined table, which can be downloaded to the scanner
    --color-correction User defined [inactive]
        Sets the color correction table for the selected output device.
    --resolution 200|400|600|800|1200|1600|3200dpi [200]
        Sets the resolution of the scanned image.
    --x-resolution 133|200|400|600|800|1200|1600|3200dpi [200]
        Sets the horizontal resolution of the scanned image.
    --y-resolution 133|200|400|600|800|1200|1600|2400|3200|4800|6400|9600dpi [200]
        Sets the vertical resolution of the scanned image.
    --threshold 0..255 [inactive]
        Select minimum-brightness to get a white point
  Advanced:
    --mirror[=(yes|no)] [inactive]
        Mirror the image.
    --speed[=(yes|no)] [no]
        Determines the speed at which the scan proceeds.
    --auto-area-segmentation[=(yes|no)] [inactive]

    --short-resolution[=(yes|no)] [no]
        Display short resolution list
    --zoom 50..200 [inactive]
        Defines the zoom factor the scanner will use
    --red-gamma-table 0..255,...
        Gamma-correction table for the red band.
    --green-gamma-table 0..255,...
        Gamma-correction table for the green band.
    --blue-gamma-table 0..255,...
        Gamma-correction table for the blue band.
    --wait-for-button[=(yes|no)] [no]
        After sending the scan command, wait until the button on the scanner
        is pressed to actually start the scan process.
    --monitor-button[=(yes|no)] [no]
        Indicates whether a button on the scanner has been pressed (read-only
        option).
  Color correction coefficients:
    --cct-1 -2..2 [1.0878]
        Controls red level
    --cct-2 -2..2 [-0.0666962]
        Adds to red based on green level
    --cct-3 -2..2 [-0.0210876]
        Adds to red based on blue level
    --cct-4 -2..2 [-0.0891876]
        Adds to green based on red level
    --cct-5 -2..2 [1.15129]
        Controls green level
    --cct-6 -2..2 [-0.0621948]
        Ad...

Read more...

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Well, that sounds like a bug in the epson driver - there are well known names for the scan modes in saneopts.h that backends should use. I've updated simple-scan to try Lineart then Binary then Gray for text mode. Have you tried reporting this issue to SANE?

Revision history for this message
staedtler-przyborski (staedtler-przyborski-deactivatedaccount) wrote :

>Well, that sounds like a bug in the epson driver

When you have a closer look at different backends you'll find that such 'bugs' are common in sane. Even spelling is not consistent in the backends. You'll find e.g. 'color' and 'colour' and so on...

The only alternative would be to rewrite sane from scratch

>Have you tried reporting this issue to SANE?

Years ago I was in heavy discussions with some sane developers, afterwards I've decided to let Tame/2 (the sane frontend for OS/2 I've already told you, maybe you can now imagine why I named it Tame ...) use a own database with all the settings per scanner.

Revision history for this message
staedtler-przyborski (staedtler-przyborski-deactivatedaccount) wrote :

>I've updated simple-scan to try Lineart then Binary then Gray for text mode.

This won't be sufficient. Here an output from a brother MFC 8460N device

Options specific to device `brother2:net1;dev0':
  Mode:
    --mode Black & White|Gray[Error Diffusion]|True Gray|24bit Color|24bit Color[Fast] [24bit Color]
        Select the scan mode
    --resolution 100|150|200|300|400|600|1200|2400|4800|9600dpi [200]
        Sets the resolution of the scanned image.
    --source FlatBed|Automatic Document Feeder [Automatic Document Feeder]
        Selects the scan source (such as a document-feeder).
    --brightness -50..50% (in steps of 1) [inactive]
        Controls the brightness of the acquired image.
    --contrast -50..50% (in steps of 1) [inactive]
        Controls the contrast of the acquired image.
  Geometry:
    -l 0..215.9mm (in steps of 0.0999908) [0]
        Top-left x position of scan area.
    -t 0..355.6mm (in steps of 0.0999908) [0]
        Top-left y position of scan area.
    -x 0..215.9mm (in steps of 0.0999908) [215.88]
        Width of scan-area.
    -y 0..355.6mm (in steps of 0.0999908) [355.567]
        Height of scan-area.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Fine, I've added a whole list of the bad mode names based on looking through the sane-backends source. And I've patched SANE to do it properly:
https://alioth.debian.org/tracker/index.php?func=detail&aid=312178&group_id=30186&atid=410366

Revision history for this message
staedtler-przyborski (staedtler-przyborski-deactivatedaccount) wrote :

Great ! Both scanners I have in reach (Epson V100 - local attached, Brother MFC 8460N - network attached) are working now in both modes.

Revision history for this message
staedtler-przyborski (staedtler-przyborski-deactivatedaccount) wrote :
Download full text (4.0 KiB)

Here we go again ;-)

Epson 1250 (using plustek backend) works only in color mode, scan-size is TPU (not Flatbed), Text fails completly.
works in Xsane (using gray and color, lineart scans in TPU size)

BTW. this scanner is crap (needs a long time to start, I've thought several times it is defunct) and it took me some time to get it working (by editing plustek.conf)

Output of 'scanimage -h'

Options specific to device `plustek:libusb:003:003':
  Scan Mode:
    --mode Lineart|Gray|Color [Color]
        Selects the scan mode (e.g., lineart, monochrome, or color).
    --depth 8|14bit [8]
        Number of bits per sample, typical values are 1 for "line-art" and 8
        for multibit scans.
    --source Normal|Transparency|Negative [Normal]
        Selects the scan source (such as a document-feeder).
    --resolution 50..2400dpi [50]
        Sets the resolution of the scanned image.
    --preview[=(yes|no)] [no]
        Request a preview-quality scan.
  Geometry:
    -l 0..215mm [0]
        Top-left x position of scan area.
    -t 0..297mm [0]
        Top-left y position of scan area.
    -x 0..215mm [103]
        Width of scan-area.
    -y 0..297mm [76.21]
        Height of scan-area.
  Enhancement:
    --brightness -100..100% (in steps of 1) [0]
        Controls the brightness of the acquired image.
    --contrast -100..100% (in steps of 1) [0]
        Controls the contrast of the acquired image.
    --custom-gamma[=(yes|no)] [no]
        Determines whether a builtin or a custom gamma-table should be used.
    --gamma-table 0..255,... [inactive]
        Gamma-correction table. In color mode this option equally affects the
        red, green, and blue channels simultaneously (i.e., it is an intensity
        gamma table).
    --red-gamma-table 0..255,... [inactive]
        Gamma-correction table for the red band.
    --green-gamma-table 0..255,... [inactive]
        Gamma-correction table for the green band.
    --blue-gamma-table 0..255,... [inactive]
        Gamma-correction table for the blue band.
  Device-Settings:
    --lamp-switch[=(yes|no)] [no]
        Manually switching the lamp(s).
    --lampoff-time 0..999 (in steps of 1) [0]
        Lampoff-time in seconds.
    --lamp-off-at-exit[=(yes|no)] [no]
        Turn off lamp when program exits
    --warmup-time -1..999 (in steps of 1) [30]
        Warmup-time in seconds.
    --lamp-off-during-dcal[=(yes|no)] [inactive]
        Always switches lamp off when doing dark calibration.
    --calibration-cache[=(yes|no)] [no]
        Enables or disables calibration data cache.
    --speedup-switch[=(yes|no)] [yes]
        Enables or disables speeding up sensor movement.
    --calibrate [inactive]
        Performs calibration
  Analog frontend:
    --red-gain -1..63 (in steps of 1) [-1]
        Red gain value of the AFE
    --green-gain -1..63 (in steps of 1) [-1]
        Green gain value of the AFE
    --blue-gain -1..63 (in steps of 1) [-1]
        Blue gain value of the AFE
    --red-offset -1..63 (in steps of 1) [-1]
        Red offset value of the AFE
    --green-offset -1..63 (in steps of 1) [-1]
        Green offset value of the AFE
    --blue-offset -1..63 (in steps of 1) [-1]
        Bl...

Read more...

Revision history for this message
staedtler-przyborski (staedtler-przyborski-deactivatedaccount) wrote :

Again the epson 1250 with plustek backend...

This scanner (-driver) drive me nuts.

Today lineart (Text) worked in Simple-Scan, after tweaking plustek.conf once more.

So only wrong size in all modes (TPU size instead of Full Flatbed) remains.

There is also a non-free epsonkowa plugin (using the epsonkowa backend) but as it conflicts with the one used by my epson V100 I gave up playing around.

Happy New Year

Revision history for this message
Robert Ancell (robert-ancell) wrote :

I'm going to close this as I think I've got all the correct mode names implemented (upstream just took my patch to make them all the same on all backends so this shouldn't be a problem in the future). If this is still occurring please open new bugs with the specific scanners that are causing the problems. Thanks!

Changed in simple-scan:
importance: Undecided → Medium
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.