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