scan.py - scans cannot be saved as JPEG since python-pillow-4.2.0

Bug #1741214 reported by zdohnal
8
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/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). The attached patch fixes it.

Tags: patch
Revision history for this message
zdohnal (zdohnal) wrote :
Revision history for this message
meeuw (dick-mrns) wrote :

Thanks for the patch, I think you should remove the if 'JPEG' condition, it's also required for raw scans.

Revision history for this message
zdohnal (zdohnal) wrote :

Ah, I overlooked raw option! Sorry, you're right of course.

Revision history for this message
Nishitha Antony (ni301701) wrote :

Hi,
We tried to reproduce the reported issue in lab and it is reproducible. We will discuss this with HP program management team for incorporating this fix in the next release and keep you posted on the updates.
Thanks,
Nishitha

Changed in hplip:
status: New → In Progress
Revision history for this message
Hans-Peter Jansen (frispete) wrote :

The change was taken over upstream in an improved form (or reinvented), hence this issue can be closed now...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.