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

Scanner modes mapping #22

Open
sapo33 opened this issue Feb 4, 2020 · 2 comments
Open

Scanner modes mapping #22

sapo33 opened this issue Feb 4, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@sapo33
Copy link

sapo33 commented Feb 4, 2020

When scanning with a Samsung C460 Series, resulting jpg file has a null size. Investigating a bit shows that the scanner doesn't consider "Color" / "Gray" / "Lineart" as acceptable modes and has its own labels instead.

It would be great if we could configure an additionnal abstract list (key/value) to map scanner modes, ie:
modes["Color"]="Color - 16 Million Colors"
modes["Gray"] = "Grayscale - 256 Levels"
modes["Lineart"] = "Black and White - Line Art"

Values could be imported via include in ScannerStorage.php

A last word to mention how happy I am to use your Nextcloud Scanner implementation and to thank you for that.

@Biont
Copy link
Collaborator

Biont commented Feb 4, 2020

@sapo33 If you can, maybe check out the vuejs-rework branch (see #12) which attempts to gather the available scan parameters directly from the back-end. It could be that it works for you, even though the implementation is still very much WIP

@e-alfred e-alfred added the enhancement New feature or request label Jun 5, 2020
@Kunzol
Copy link

Kunzol commented Jul 13, 2021

On my brother MFC-L2710 the modes shown are:

scanimage --device "brother4:net1;dev0" -A
...
--mode Black & White|Gray[Error Diffusion]|True Gray|24bit Color[Fast] [24bit Color[Fast]]
...

as far as I understood the scanimage manual, only the first characters are needed:

For convenience,  it is legal to abbreviate the string values as long as they remain unique.  
Also, the case of the spelling doesn't matter.  For example, option setting --mode col is identical to --mode Color.

In my case it worked with black, true, 24bit (I left out the "Error Diffusion").

The ideal case would be to parse the output of scanimage. But it takes quiet some time till the output shows up.
Ether once on install or somewhere in the settings would be better.
I am not sure about my Nextcloud-App-Programming skills. Maybe I try something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants