sxiv icon indicating copy to clipboard operation
sxiv copied to clipboard

Added support for webp image files.

Open alexdw-mgzi opened this issue 6 years ago • 5 comments

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).

alexdw-mgzi avatar Feb 19 '19 00:02 alexdw-mgzi

Why not just install imlib2-webp? It adds WebP support to imlib2 and therefore anything that uses it to display images.

ropery avatar Mar 10 '19 08:03 ropery

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.

xyb3rt avatar Mar 15 '19 11:03 xyb3rt

imlib2 1.6 added webp support, so sxiv can already load webp thumbnails and single-frame images without further changes.

guidocella avatar Dec 01 '19 22:12 guidocella

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.

idnsunset avatar Jul 05 '20 15:07 idnsunset

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 .

idnsunset avatar Nov 29 '20 08:11 idnsunset