Issue 625 in webp: Can webpjs decode animated webp?

317 views
Skip to first unread message

wjf56… via monorail

unread,
Nov 14, 2023, 8:46:58 AM11/14/23
to webp-d...@webmproject.org
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 625 by wjf56...@gmail.com: Can webpjs decode animated webp?
https://bugs.chromium.org/p/webp/issues/detail?id=625

Try to decode animated webp on the web, but the api is not found

--
You received this message because:
1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

vrab… via monorail

unread,
Nov 14, 2023, 9:38:35 AM11/14/23
to webp-d...@webmproject.org

Comment #1 on issue 625 by vra...@google.com: Can webpjs decode animated webp?
https://bugs.chromium.org/p/webp/issues/detail?id=625#c1

We do not provide that API. The demo decodes a full image, not an animation: https://chromium.googlesource.com/webm/libwebp/+/refs/heads/main/webp_js/index.html

https://chromium.googlesource.com/webm/libwebp/+/refs/heads/main/extras/webp_to_sdl.c#33 is the function used to interface with the web.
If you modify this function to also take a frame number, and call the demuxer API (instead of WebPDecodeRGBA), like detailed at https://chromium.googlesource.com/webm/libwebp/+/refs/heads/main/src/webp/demux.h#16, that should do it.

wjf56… via monorail

unread,
Nov 15, 2023, 8:26:17 PM11/15/23
to webp-d...@webmproject.org

Comment #2 on issue 625 by wjf56...@gmail.com: Can webpjs decode animated webp?
https://bugs.chromium.org/p/webp/issues/detail?id=625#c2

However, in this website:https://libwebpjs.hohenlimburg.org/v0.6.0/, I found that demux.js can parse webp frame rate. What is the difference between libwebpjs here and web_js under libwebp? Can I use it ?

James Zern

unread,
Nov 15, 2023, 10:07:10 PM11/15/23
to webp-d...@webmproject.org
Hi,

On Wed, Nov 15, 2023 at 5:26 PM wjf56… via monorail <monorail+norepl...@chromium.org> wrote:

Comment #2 on issue 625 by wjf56...@gmail.com: Can webpjs decode animated webp?
https://bugs.chromium.org/p/webp/issues/detail?id=625#c2

However, in this website:https://libwebpjs.hohenlimburg.org/v0.6.0/, I found that demux.js can parse webp frame rate. What is the difference between libwebpjs here and web_js under libwebp? Can I use it ?

That library isn't supported by this project, but you're free to use it if it satisfies your needs. It hasn't been updated in quite some time, so I'd suggest upgrading it to use the latest version of libwebp (1.3.2) before using it in a production environment.
Reply all
Reply to author
Forward
0 new messages