Skip to content

Scanner modes mapping #22

Open
Open

Description

@sapo33

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.

Activity

  1. Biont commented on Feb 4, 2020

    @Biont
    Collaborator

    @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

  2. Kunzol commented on Jul 13, 2021

    @Kunzol

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions