hyde icon indicating copy to clipboard operation
hyde copied to clipboard

"Error occured when calling imagethumbnails" message

Open barryrowlingson opened this issue 3 years ago • 1 comments

Thumbnailing JPEGs failed with a

20:44:31 hyde Error occured when calling imagethumbnails

This line:

https://github.com/hyde/hyde/blob/7f415402cc3e007a746eb2b5bc102281fdb415bd/hyde/ext/plugins/images.py#L295

hyde converts the PIL image to RGBA, but that fails with Pillow after v3.7 because it was deprecated and then removed:

https://github.com/python-pillow/Pillow/commit/193c7561392fd12c3bd93bc232d9041c89bec4f6

with the advice to convert to RGB before saving. I think the solution for hyde is to not convert to RGBA on line 295 for JPEG files.

short diff attached tests and only converts non-JPEG to RGBA.

diff.txt

(Let me know if you'd rather I did a fork and PR, but its about two lines!)

barryrowlingson avatar Oct 04 '21 19:10 barryrowlingson

(Let me know if you'd rather I did a fork and PR, but it's about two lines!)

Yes, please. Please note: Hyde has been unmaintained for quite sometime though. I still use it in a few of my projects and I know it's still used elsewhere.

navilan avatar Oct 05 '21 05:10 navilan