hplip/hplip-lineart.patch
Petr Šabata 3b7ae335f3 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/hplip#7cb6f648cdb35a0f018b511d10b516d6d9e4d638
2020-10-15 12:26:13 +02:00

15 lines
1.0 KiB
Diff

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)