diff --git a/Fix-scanning-with-python-pillow-4.2.0.patch b/Fix-scanning-with-python-pillow-4.2.0.patch new file mode 100644 index 0000000..c24c8ba --- /dev/null +++ b/Fix-scanning-with-python-pillow-4.2.0.patch @@ -0,0 +1,37 @@ +From 72be09ee8482cdd19e0895f8f536854c2dafe535 Mon Sep 17 00:00:00 2001 +From: Martin Wilck +Date: Tue, 12 Jun 2018 15:17:11 +0200 +Subject: [PATCH] Fix scanning with python-pillow 4.2.0 + +python-pillow released new version (4.2.0), which forbids +saving RGBA data to JPEG. This behavior breaks scanning +by hp-scan. Output is: + + $ hp-scan -m color -s file + Saving to file /home/zdohnal/hpscan001.jpg + error: Error saving file: cannot write mode RGBA as JPEG (I/O) + +These RGBA data needs to be convert to RGB data before saving as JPEG +(other formats - PNG, PNM, TIFF etc. - works fine, because they doesn't +ignore A channel). + +https://bugs.launchpad.net/hplip/+bug/1741214 +--- + scan.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/scan.py b/scan.py +index c33d84b..1ae4079 100755 +--- a/scan.py ++++ b/scan.py +@@ -1078,6 +1078,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) +-- +2.17.0 + diff --git a/hpijs-avoid-segfault-in-DJGenericVIP-DJGenericVIP.patch b/hpijs-avoid-segfault-in-DJGenericVIP-DJGenericVIP.patch index ed7b13b..f306cf7 100644 --- a/hpijs-avoid-segfault-in-DJGenericVIP-DJGenericVIP.patch +++ b/hpijs-avoid-segfault-in-DJGenericVIP-DJGenericVIP.patch @@ -1,4 +1,4 @@ -From 894ea64f4742a5c2a5f17f4e950f4ae3599d802e Mon Sep 17 00:00:00 2001 +From ca4af49f2979610ff2c6818ebd0072432417ba95 Mon Sep 17 00:00:00 2001 From: Martin Wilck Date: Fri, 1 Jun 2018 17:09:31 +0200 Subject: [PATCH] hpijs: avoid segfault in DJGenericVIP::DJGenericVIP() @@ -42,7 +42,7 @@ index 519036c..0a5c959 100644 else ePen = BOTH_PENS; // matches default mode diff --git a/prnt/hpijs/dj9xxvip.h b/prnt/hpijs/dj9xxvip.h -index 85eb3ac..8d42265 100644 +index 85eb3ac..af1be8f 100644 --- a/prnt/hpijs/dj9xxvip.h +++ b/prnt/hpijs/dj9xxvip.h @@ -42,7 +42,8 @@ APDK_BEGIN_NAMESPACE @@ -51,7 +51,7 @@ index 85eb3ac..8d42265 100644 public: - DJ9xxVIP(SystemServices* pSS, BOOL proto=FALSE); + DJ9xxVIP(SystemServices* pSS, BOOL proto=FALSE, -+ BOOL ignore_pen_error=TRUE); ++ BOOL ignore_pen_error=FALSE); Header* SelectHeader(PrintContext* pc); DRIVER_ERROR VerifyPenInfo(); diff --git a/hplip.changes b/hplip.changes index 9078e64..d9004e1 100644 --- a/hplip.changes +++ b/hplip.changes @@ -3,10 +3,22 @@ Sun Jun 24 05:22:01 UTC 2018 - bwiedemann@suse.com - require python3-Pillow for hp-scan to work +------------------------------------------------------------------- +Tue Jun 12 13:24:15 UTC 2018 - mwilck@suse.com + +- Fix scanning with python-pillow 4.2.0 (boo#1086755, #lp1741214) + +------------------------------------------------------------------- +Thu Jun 7 06:50:26 UTC 2018 - mwilck@suse.com + +- Fix bug in hpijs-avoid-segfault-in-DJGenericVIP-DJGenericVIP.patch: + default behavior of DJ9xxVIP device must not be changed + ------------------------------------------------------------------- Fri Jun 1 15:18:19 UTC 2018 - mwilck@suse.com -- avoid segfault in DJGenericVIP::DJGenericVIP() (boo#1094141) +- avoid segfault in DJGenericVIP::DJGenericVIP() (boo#1094141, + lp#1774660) * added hpijs-avoid-segfault-in-DJGenericVIP-DJGenericVIP.patch ------------------------------------------------------------------- diff --git a/hplip.spec b/hplip.spec index cf673be..a2ac973 100644 --- a/hplip.spec +++ b/hplip.spec @@ -90,6 +90,7 @@ Patch108: add_missing_includes_and_define_GNU_SOURCE.patch # PATCH-FIX-SUSE: GNOME no longer provides a system tray, so don't warn the user that we can't find it Patch109: no-systray-failure-message.patch Patch110: hpijs-avoid-segfault-in-DJGenericVIP-DJGenericVIP.patch +Patch111: Fix-scanning-with-python-pillow-4.2.0.patch # Patch200 fixes device communication and detection via MDNS in some network setups: Patch200: hplip-mdns.patch # Patch201 makes MDNS lookups more robust by retrying queries: @@ -166,8 +167,8 @@ Requires: foomatic-filters # Therefore the hplip main package which is intended # to get "all the HPLIP stuff" installed has the RPM requirement: Requires: %{pymod %gobject} -Requires: ghostscript Requires: %{pymod Pillow} +Requires: ghostscript %if %use_qt5 Requires: %{pymod qt5} @@ -399,6 +400,7 @@ This sub-package is only required by developers. %patch108 -p1 -b .add_missing_includes_and_define_GNU_SOURCE.orig %patch109 -p1 -b .systemtray.py.orig %patch110 -p1 -b .boo1094141 +%patch111 -p1 -b .boo1096755 %patch200 -p1 -b .mdns %patch201 -p1 -b .mdns-retry %patch300 -p1 -b .pcardext-python3