azaghal / pydenticon

Pydenticon is a small utility library that can be used for deterministically generating identicons based on the hash of provided data.
BSD 3-Clause "New" or "Revised" License
66 stars 10 forks source link

Convert to RGB before saving as JPEG. #8

Closed andrewshadura closed 7 years ago

andrewshadura commented 7 years ago

Pillow 3.7 removes support for saving RGBA images as JPEG.

Images need to be converted explicitly before saving, or errors like this happen.

azaghal commented 7 years ago

Wow, wasn't even aware the package ended-up in Debian, my first ever :)

The fix seems fairly simple, I'll try it out and release a new version soon-ish (1-2 days possibly). Possibly testing against multiple versions of Pillow could be useful, I hope the convert call has been part of Pillow API for a long time now?

azaghal commented 7 years ago

Can't seem to find Pillow 3.7 via pip, though - have they ever officially released it?

andrewshadura commented 7 years ago

I'm not sure it's been released, but that's what the deprecation warning says, and the version currently in Debian unstable has this change done. I'll check the version when I come back home in an hour.

--

On 3 Sep 2017 13:37, "Branko Majic" notifications@github.com wrote:

Can't seem to find Pillow 3.7 via pip, though - have they ever officially released it?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/azaghal/pydenticon/pull/8#issuecomment-326799587, or mute the thread https://github.com/notifications/unsubscribe-auth/AAS4BU8F2Th1U1bZ1ghckhz2c4m7Lmklks5seo-EgaJpZM4PLHwo .

azaghal commented 7 years ago

No worries, I managed to reproduce starting with 4.2.0 (version from PyPI), and the fix seems to work with older versions of Pillow too.

As a side-note, the PR will probably end-up being merged on my personal server with updated commit comment/signature, and then pushed to Github (I use Github mainly for mirror/visibility/easier 3rd-party reporting :) I usually keep the commit authors intact otherwise.

Otherwise, should there be anything useful to improve apropos distro-related packaging, feel free to let me know :)

azaghal commented 7 years ago

Ok, just released version 0.3.1, just need to figure out if Github will detect this PR is effectively merged :)

andrewshadura commented 7 years ago

Thanks! (Merged as 4b3174d)