Applying quote fails with Pillow>=4.2.0
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Variety |
Fix Released
|
High
|
James Lu |
Bug Description
Starting with Pillow 4.2.0, Variety fails when trying to apply a quote:
ERROR: 2017-07-07 23:38:08,246: apply_quote() 'Could not apply quote:'
Traceback (most recent call last):
File "/usr/lib/
QuoteWriter
File "/usr/lib/
raise exception[0]
IOError: cannot write mode RGBA as JPEG
This seems to be caused by the following change:
"Before Pillow 4.2.0, attempting to save an RGBA image as JPEG would discard the alpha channel. From Pillow 3.4.0, a deprecation warning was shown. From Pillow 4.2.0, the deprecation warning is removed and an :py:exc:`IOError` is raised." (https:/
Explicitly converting the image-with-quote to RGB before saving seems to solve the issue (patch attached)
Changed in variety: | |
importance: | Medium → High |
Changed in variety: | |
milestone: | none → 0.6.5 |
status: | Fix Committed → Fix Released |
Changed in variety: | |
assignee: | nobody → James Lu (tacocat) |
Looks good, and there are no apparent side effects on older (4.x) versions of Pillow. Merged in https:/ /bazaar. launchpad. net/~variety/ variety/ trunk/revision/ 595, thanks!