Closed yzhs closed 2 years ago
Figured out the limitation in PIL: P mode PNGs cannot be converted to JPEG. When first converting to RGB(A) mode, it works, though.
Stackoverflow has the answer, as always. :-)
Adds conditional conversion to RGBA mode and removes guards introduced in #30.
Tested locally with this screenshot:
python imgp --convert --overwrite screenshot.png # and python imgp --convert --overwrite --rotate 90 screenshot.png
Fixes #50
Thank you!
Figured out the limitation in PIL: P mode PNGs cannot be converted to JPEG. When first converting to RGB(A) mode, it works, though.
Stackoverflow has the answer, as always. :-)
Adds conditional conversion to RGBA mode and removes guards introduced in #30.
Tested locally with this screenshot:
Fixes #50