libsane-hpaio: SCL scan resolutions list too restrictive

Bug #1784118 reported by Geoff Clare
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
In Progress
Undecided
Unassigned

Bug Description

Somewhere between 3.10 and 3.14 the supported resolutions for SCL scanners changed from a range to a list. This manifests in xsane as a change from a text box where you can enter any resolution you want to a drop-down list of resolutions to choose from. To me this change is an unacceptable loss of functionality. (I'll explain why at the end).

I found that I could reinstate the old functionality by commenting out one line in the SetResolutionListSCL() function in scan/sane/scl-pml.c:

hpaio->option[OPTION_SCAN_RESOLUTION].constraint_type = SANE_CONSTRAINT_WORD_LIST;

I originally reported this as a Debian bug and the response was that I should report it upstream in order to ascertain why the change from a range to a list was made, as this will affect what Debian decide to do about it. See https://bugs.debian.org/883182 for the four different courses of action that I suggested and for Brian Potkin's response.

As to why the new SCL resolution list is an unacceptable loss of functionality for me, it's because I like to scan 6x4 photos at 800 dpi. I could achieve the same result by scanning at 1200 and then scaling the photo afterwards, but this is not an acceptable solution because my scanner (a PSC 2175) behaves completely differently at 1200 dpi. Instead of scanning quite quickly in one continuous motion like it does at 800, at 1200 it scans extremely slowly with many back-and-forth motions that drive me nuts.

Tags: scan
Revision history for this message
srinivas (srinivas5) wrote :

Hi Geoff,

We will check with the team and try to incorporate your request of having resolutions as a range option in our future releases.

Regards,
Srinivas Teja.

Changed in hplip:
status: New → In Progress
Revision history for this message
brian_p (claremont102) wrote :

Checking with the team is good. Will it take long for a response to appear here?

Irrespective of what their decision is it would be nice to know why the facility to have the resolution displayed as a range disappeared. There is probably a very good reason for the change, but only the developers can know about it. Is there any possibility of learning why?

--
Brian.

Revision history for this message
srinivas (srinivas5) wrote :

Hi,

I have checked with my team, the supported resolutions for SCL scanners comes from the device itself and it is a list of values only. So we cannot support intermediate resolutions in a range.

Regards,
Srinivas Teja.

Revision history for this message
Geoff Clare (geoffclare) wrote :

Hi Srinivas.

Your team is mistaken. In my original report I said that commenting out one line of code reinstated the old functionality (allowing me to set the resolution to any value in the supported range, instead of having to choose from a drop-down list). This would not be possible if, as your team claims, my scanner was sending a list rather than a range.

Please ask your team to look at the source of the function I mentioned, SetResolutionListSCL() in scan/sane/scl-pml.c. It's obvious that the entire purpose of that function is to take the range of resolutions supported by an SCL scanner and to produce a list of "standard" resolutions which are within that range.

Thanks,
Geoff.

Revision history for this message
brian_p (claremont102) wrote :

Apologies for the late reply. The topic dropped off my radar.

Thanks to Srinivas for checking and getting back to us. I have to agree that supported resolutions for SCL scanners do indeed come from the device itself. For my HP psc_1300_series device:

  root@wheezy:~# scanimage -A

  All options specific to device `hpaio:/usb/psc_1300_series?serial=HU3AFBQ28Y9F':
    Scan mode:
      --mode Lineart|Gray|Color [Color]
          Selects the scan mode (e.g., lineart, monochrome, or color).
      --resolution 75|100|150|200|300|600dpi [75]
          Sets the resolution of the scanned image.

The resolutions are discrete values. All well and good - except I have a very clear recollection of doing a lot of scanning in 2010 and xsane allowing me to set the scanned image resolution with a slider, not via a list. This was on Debian lenny with hplip pre-3.12.6. Checking the produced images with the file utility reveals resolutions for png images of:

  1021 x 728, 626 x 731, 1025 x 701, 1012 x 685, 566 x 768 etc.

Only the hplip backend could have changed with 3.12.x. The team may be correct, but they are also saying "we do not know why this change took place". That was the bit I was interested in. I am not going to guess why.

Whatever the reason, it is obvious the change will not be reverted.

FTR, I also made an enquiry on sane-devel:

  https://alioth-lists.debian.net/pipermail/sane-devel/2018-August/036275.html

--
Brian.

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.