Created attachment 13568 [details] ExampleCBZ+WEBP.cbz Please add support for modern image format .webp
WebP is not common enough to warrant adding yet another third party library dependency and code size.
Maybe it's time to add WEBP support, 2022 is comming and WEBP has become very popular in EPUB books as well.
*** Bug 704783 has been marked as a duplicate of this bug. ***
Created attachment 22498 [details] Webp support using libwebp This patch adds support for webp using libwebp. There is support for ICCP and EXIF as well. Just as for some other third party libraries, both static and system libs are supported for *nix platforms. Compilation has been verified for Windows, Linux, Wasm, Python, Android and Java. Unable to verify for Mac as I do not have one. Patch contains thirdparty submodule for libwebp. Have submitted Artifex Contributor License Agreement to info@artifex.com
Okay, I was going to file a new bug about this and got here.
I tried the attached patch - there are some bitrot against current head (mainly collisions with psd - photoshop? - image support which was added later), and I found it couldn't open the attached sample file. (which calibre can open). Anyway, I see the code added is mainly in the cbz code path, and I am wondering about its applicability to the epub code path, which is where I came from. I have a bunch of epub's - which are zipped html's - for which mupdf current emits these: ... format error: cannot locate font '../Fonts/nzkxzd.ttf' specified by css warning: cannot load font-face: ../Fonts/nzkxzd.ttf warning: html: cannot load image src='../Images/head-05.webp' warning: html: cannot load image src='../Images/end.webp' i.e. the webp images are referenced by the html's.
FWIW, webp images are quite common these days - news.yahoo.com uses them, for example.
The patch (after correct for bitrot) does support those epubs I have. Sorry about the noise - scripted the rpm rebuild and didn't get the patch applied correctly.
If you have updates to the patch, do share. The maintainers of MuPDF have no intention of adding this support. I wanted to contribute to this project. I offered to help with development and testing but that went nowhere :) I am happy at least my patch was useful for LibreraReader project.
> If you have updates to the patch, do share. We use an updated version of the patch here: https://github.com/koreader/koreader-base/blob/a3cf1e93efd182292827d5ee3028c9128f33131c/thirdparty/mupdf/webp-upstream-697749.patch