sxiv
sxiv copied to clipboard
Added support for webp image files.
I added support for viewing WebP image files using libwebp. Animation is implemented based on the existing GIF support. I have tested this with versions 0.5.2 and 1.0.2 of libwebp (the --enable-libwebpdemux configure option is required if building libwebp from source).
Why not just install imlib2-webp? It adds WebP support to imlib2 and therefore anything that uses it to display images.
This looks promising, but we also have to load the first frame in thumbnail mode. Can you refactor the code so that image and thumb code can use a shared function for the first frame and image mode then loads the rest of them like the gif loader? @lolilolicon There is no multi-frame support in imlib2, so we need this for webp animations as we do for gif.
imlib2 1.6 added webp support, so sxiv can already load webp thumbnails and single-frame images without further changes.
imlib2 1.6 added webp support, so sxiv can already load webp thumbnails and single-frame images without further changes.
I still get "Error opening image" with imlib2.1.6+ when opening multi-frame webp images, not as expected that the first frame gets loaded as with imlib2-webp.
Thanks for your info, but my files exactly have the correct extension and I just simply get an 'Error opening image' message in the console output.
On Wed, 4 Nov 2020 at 20:20, abe1242 [email protected] wrote:
@idnsunset https://github.com/idnsunset I had the same problem. Make sure that the file extension is set correctly. ie, *.webp. For me sxiv wouldn't open the image without the .webp extension, but it worked perfectly afterwards. Hope this helps
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/muennich/sxiv/pull/348#issuecomment-721700137, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHNCXPZBNEZCU4ZUUTUAE53SOFBJ5ANCNFSM4GYHV7BA .