scan.py - scans cannot be saved as JPEG since python-pillow-4.2.0
Bug #1741214 reported by
zdohnal
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
HPLIP |
In Progress
|
Undecided
|
Unassigned |
Bug Description
Hi,
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/
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). The attached patch fixes it.
To post a comment you must log in.
Thanks for the patch, I think you should remove the if 'JPEG' condition, it's also required for raw scans.