[contains fix] With no output filename given, output format of scans ignores -x / --compression option and is solely determined by -m / --mode where -m color produces JPGs and -m gray produces PNGs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
HPLIP |
In Progress
|
Undecided
|
Unassigned |
Bug Description
I have tried this with 3.17.11 which I've been running until now and have installed (latest) 3.18.6 today where the issue persists.
When no output file is specified (-o), the output file format isn't picked according to the compression chosen but according to the mode (color or gray).
-------
$ hp-scan -m gray -x jpeg
will produce a PNG file.
Output:
Mode: gray
Compression: JPEG
...
Setting output format to PNG for greyscale mode.
-------
$ hp-scan -m gray
will produce a PNG file.
Output:
Mode: gray
Compression: JPEG
...
Setting output format to PNG for greyscale mode.
-------
$ hp-scan -m color -x raw
will produce a JPEG file.
Output:
Mode: color
Compression: None
...
Setting output format to JPEG for color/lineart mode.
-------
$ hp-scan -m color
will produce a JPEG file.
Mode: color
Compression: JPEG
...
Setting output format to JPEG for color/lineart mode.
-------
This is confusing.
I went over to `/usr/share/
-------
if 'file' in dest and not output:
if adf:
else:
if scan_mode == 'gray':
else:
try:
if output_type == 'jpg':
except IndexError:
-------
To get PNG files in colour mode I *have to* specify an output filename with .png extension manually.
The -x/--compression option has virtually no effect, because the output filename solely relies on either the -o option or the -m option.
In the above code this:
-------
if scan_mode == 'gray':
-------
should be changed so something like this
-------
if scanner_compression == 'jpeg':
-------
Which I have tested and works.
Changed in hplip: | |
status: | New → In Progress |
Hi Luke,
Thanks for your analysis. we will try to incorporate your suggestions on the compression(-x) in our future releases. png/jpg/ pdf
Yes currently we should specify the hp-scan command in the below way to get respective output file formats.
hp-scan --adf --mode=color/gray --filetype=
Thanks,
Srinivas Teja.