Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect resolution detection at Panasonic MB1500 #739

Open
rma945 opened this issue Sep 17, 2024 · 0 comments
Open

incorrect resolution detection at Panasonic MB1500 #739

rma945 opened this issue Sep 17, 2024 · 0 comments

Comments

@rma945
Copy link

rma945 commented Sep 17, 2024

Describe the bug
scanservjs can't parse --resolution parameter from scanimage output, becuase it don't contains expected regexp.

scanservsjs expects that all parameters from scanimage can be matched by this regexp but --resolution 75|100|150|200|300|400|600|1200dpi,... has a different format.
Also, asResolution() function will do incorrect resolution options parse, becuase of non expected format of resolution parameters string.
Because --resolution - is a mandatory parameter - scanservjs can't find scanner and resolution options can't be overrided by default config.
I guess that as a workaround - we can add option for define a manual values for scanners if output from scanimage can't be parsed

scanimage output:

Output format is not set, using pnm as a default.

All options specific to device `panamfs:libusb:001:002':
    --preview[=(yes|no)] [no]
        Request a preview-quality scan.
    --mode Black and White|Grayscale|Color [Color]
        "Black and White" is for documents containing only text or line art.
        "Grayscale" is for documents containing photographs. "Color" is for
        document containing color image (color scan models only).
    --resolution 75|100|150|200|300|400|600|1200dpi,...
        Select a resolution of your document.
    --paper-size A4|Letter|B5(ISO)|B5(JIS)|16K|User Define [Letter]
        Select a Scan Size that corresponds to the size of your original
        document.
    -l 0..215.9mm [0.998215]
        Top-left x position of scan area.
    -t 0..297mm [0.998215]
        Top-left y position of scan area.
    -x 0..214.902mm [213.904]
        Width of scan-area.
    -y 0..296.001mm [277.404]
        Height of scan-area.
    --brightness 1..5 (in steps of 1) [3]
        The balance of light and dark colors in an image.
    --contrast 1..5 (in steps of 1) [3]
        The relative difference between the dark and light portions of an
        image.

Expected behavior
A clear and concise description of what you expected to happen.

Logs

  • Please include application logs (see commands below)

NodeJS version

v18.19.0

OS version

Armbian 24.11.0-trunk.141 bookworm"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant