algoo / preview-generator

generates previews of files with cache management
https://pypi.org/project/preview-generator/
MIT License
224 stars 49 forks source link

Feat: Add support for webp image #273

Closed inkhey closed 2 years ago

inkhey commented 2 years ago

Feature description and goals

Webp image is not supported in preview-generator 0.25. It's an interesting image format to support: https://en.wikipedia.org/wiki/WebP

preview_generator.exception.UnsupportedMimeType: Unsupported mimetype: image/webp

Implemented solution:

https://github.com/algoo/preview-generator/pull/276

a523 commented 2 years ago

Yeah, I think it is caused by this function builder.get_supported_mimetypes not getting the correct and complete result.

inkhey commented 2 years ago

Yes, the issue is both missing package to decode webp and missing mimetype support in list. I just created a draft PR with support in ImageMagick CLI builder (of course , this should be adapt to wand as soon as your dev is ok @a523 )

Also, it seems that animated webp is not supported (need verification).

inkhey commented 2 years ago

fixed by #276