[Bug 1096755] New: hp-scan cannot scan as jpg
http://bugzilla.opensuse.org/show_bug.cgi?id=1096755 Bug ID: 1096755 Summary: hp-scan cannot scan as jpg Classification: openSUSE Product: openSUSE Distribution Version: Leap 15.0 Hardware: x86-64 OS: Other Status: NEW Severity: Major Priority: P5 - None Component: Printing Assignee: jsmeix@suse.com Reporter: opensuse@titlis.org QA Contact: jsmeix@suse.com Found By: --- Blocker: --- hp-scan -otest.jpg results in the following error error: Error saving file: cannot write mode RGBA as JPEG (I/O) Please find a description and a patch here: https://bugzilla.redhat.com/show_bug.cgi?id=1528851 Please apply the simple patch to the hplip package -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1096755 Markus Leuthold <opensuse@titlis.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |opensuse@titlis.org -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1096755 http://bugzilla.opensuse.org/show_bug.cgi?id=1096755#c1 Johannes Meixner <jsmeix@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- URL| |https://bugs.launchpad.net/ | |hplip/+bug/1741214 CC| |martin.wilck@suse.com Found By|--- |Community User --- Comment #1 from Johannes Meixner <jsmeix@suse.com> --- https://bugzilla.redhat.com/show_bug.cgi?id=1528851#c3 tells ----------------------------------------------------------------------- Reported as https://bugs.launchpad.net/hplip/+bug/1741214 ----------------------------------------------------------------------- therein it seems https://launchpadlibrarian.net/352923466/hplip-jpeg-compression.patch (long lines may show wrapped here) ----------------------------------------------------------------------- diff -up hplip-3.17.11/scan.py.jpeg-compression hplip-3.17.11/scan.py --- hplip-3.17.11/scan.py.jpeg-compression 2018-01-08 09:26:42.547072815 +0100 +++ hplip-3.17.11/scan.py 2018-01-08 09:29:39.753604411 +0100 @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 # -*- coding: utf-8 -*- # # (c) Copyright 2003-2015 HP Development Company, L.P. @@ -1079,6 +1079,7 @@ try: log.info("Saving to file %s" % output) try: + im = im.convert("RGB") im.save(output) except IOError as e: log.error("Error saving file: %s (I/O)" % e) ----------------------------------------------------------------------- is the right final patch. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1096755 http://bugzilla.opensuse.org/show_bug.cgi?id=1096755#c2 Johannes Meixner <jsmeix@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(opensuse@titlis.o | |rg) --- Comment #2 from Johannes Meixner <jsmeix@suse.com> --- I cannot test it myself because I do not have a HP device with a scanner unit. Markus Leuthold, does it work for you when you manually modify your /usr/share/hplip/scan.py according to the above diff? I am not a python expert but perhaps you may have to remove the associated pre-compiled files /usr/share/hplip/scan.pyc /usr/share/hplip/scan.pyo (the two should be hardlinked) to ensure your modified /usr/share/hplip/scan.py gets actually used - or this might also happen automatically by python? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1096755 http://bugzilla.opensuse.org/show_bug.cgi?id=1096755#c3 --- Comment #3 from Markus Leuthold <opensuse@titlis.org> --- I can confirm that manually modifying /usr/share/hplip/scan.py according to the diff solves the issue. pyc files are automatically recreated if the corresponding py file has a newer timestamp -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1096755 http://bugzilla.opensuse.org/show_bug.cgi?id=1096755#c4 --- Comment #4 from Martin Wilck <martin.wilck@suse.com> --- Pulled the patch into home:mwilck:branches:Printing. I'll include it in my next submission. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com