Potential fix for lineart scanning (bug #1076954).

Resolves: rhbz#1076954
This commit is contained in:
Tim Waugh 2014-07-23 12:49:49 +01:00
parent 0e401c1a66
commit 01eac0e617
2 changed files with 22 additions and 1 deletions

14
hplip-lineart.patch Normal file
View File

@ -0,0 +1,14 @@
diff -up hplip-3.14.6/scan.py.lineart hplip-3.14.6/scan.py
--- hplip-3.14.6/scan.py.lineart 2014-07-23 12:30:52.361517852 +0100
+++ hplip-3.14.6/scan.py 2014-07-23 12:32:17.052940000 +0100
@@ -977,8 +977,8 @@ try:
try:
pixels_per_line = bytes_per_line * 8 # Calculation of pixels_per_line for Lineart must be 8 time of bytes_per_line
# Otherwise, scanned image will be corrupted (slanted)
- im = Image.frombuffer('RGBA', (pixels_per_line, lines), buffer.read(),
- 'raw', 'RGBA', 0, 1).convert('L')
+ im = Image.frombuffer('1', (pixels_per_line, lines), buffer.read(),
+ 'raw', '1', 0, 1).convert('L')
except ValueError:
log.error("Did not read enough data from scanner (I/O Error?)")
sys.exit(1)

View File

@ -7,7 +7,7 @@
Summary: HP Linux Imaging and Printing Project
Name: hplip
Version: 3.14.6
Release: 5%{?dist}
Release: 6%{?dist}
License: GPLv2+ and MIT
Url: http://hplip.sourceforge.net/
@ -34,6 +34,7 @@ Patch17: hplip-codec.patch
Patch18: hplip-log-stderr.patch
Patch19: hplip-avahi-parsing.patch
Patch20: hplip-reportlab.patch
Patch21: hplip-lineart.patch
%global hpijs_epoch 1
Requires: hpijs%{?_isa} = %{hpijs_epoch}:%{version}-%{release}
@ -252,6 +253,9 @@ done
# reportlab (bug #1121433).
%patch20 -p1 -b .reportlab
# Potential fix for lineart scanning (bug #1076954).
%patch21 -p1 -b .lineart
sed -i.duplex-constraints \
-e 's,\(UIConstraints.* \*Duplex\),//\1,' \
prnt/drv/hpcups.drv.in
@ -488,6 +492,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
%postun libs -p /sbin/ldconfig
%changelog
* Wed Jul 23 2014 Tim Waugh <twaugh@redhat.com> - 3.14.6-6
- Potential fix for lineart scanning (bug #1076954).
* Mon Jul 21 2014 Tim Waugh <twaugh@redhat.com> - 3.14.6-5
- Main package requires gnupg (bug #1118724).
- Fixed version comparisons for x.y.z-style versions such as