Latest on animated WebP images

1,639 views
Skip to first unread message

Urvang Joshi

unread,
Nov 28, 2012, 8:43:05 PM11/28/12
to webp-d...@webmproject.org
Hi all,
You guys have shown a lot of interest around animation support in WebP and how to make use of it. So, here’s the latest:

Recently, significant work has gone into polishing WebP for the animation use case -- specifically, the
specification and APIs (mux.h and demux.h) for the same.

The latest code is in the git trunk as usual. Specifically, you can try out:
  • examples/gif2webp binary to convert your GIF images to WebP.
    • Install GIF library:
      • Linux: sudo apt-get install libgif-dev
      • Mac: sudo port install giflib
    • Build:  make -f makefile.unix examples/gif2webp
    • Run:  examples/gif2webp input.gif -o output.webp

  • examples/webpmux binary to create an animated WebP image from multiple single-image WebP files.
    • Build:  make -f examples/webpmux
    • Run:  examples/webpmux -frame image1.webp +100+0+0+0 -frame image2.webp +100+10+20+1 -frame image3.webp +200+0+0+0 -loop 10 -o animation.webp

  • examples/vwebp binary to preview animated WebP images.
    • Build:
      • Linux:

sudo apt-get install freeglut3-dev mesa-common-dev

make -f makefile.unix examples/vwebp

      • Mac:

make -f makefile.unix examples/vwebp

    • Run:  examples/vwebp animation.webp

Note that animation related specification & APIs are experimental as of now. So, feedback regarding these features is most welcome! How is WebP doing on your images? Is something missing? Tell us: http://code.google.com/p/webp/issues/list


Thanks,
Urvang

Urvang Joshi

unread,
Jan 3, 2013, 6:30:44 PM1/3/13
to webp-d...@webmproject.org
Hi Rüger,
Thanks for the report!

I can reproduce the issue. Having a look.

-Urvang


On Thu, Jan 3, 2013 at 7:58 AM, <literatur...@googlemail.com> wrote:
There are some artefacts at that converted zipper file  from Wikimedia comons:

http://commons.wikimedia.org/wiki/File:Zipper_animated.gif



--
You received this message because you are subscribed to the Google Groups "WebP Discussion" group.
To view this discussion on the web visit https://groups.google.com/a/webmproject.org/d/msg/webp-discuss/-/LZ3oSkwjb4wJ.

To post to this group, send email to webp-d...@webmproject.org.
To unsubscribe from this group, send email to webp-discuss...@webmproject.org.
For more options, visit this group at http://groups.google.com/a/webmproject.org/group/webp-discuss/?hl=en.

Urvang Joshi

unread,
Jan 7, 2013, 7:17:37 PM1/7/13
to webp-d...@webmproject.org
Hi Rüger,
It seems that this is due to a bug in v4.1.6 of giflib. [This is the version that is installed when you run "sudo apt-get install libgif-dev"].


I tried running gif2webp using giflib v5.0.4, and the image you reported decodes fine.
However, there are some API changes between giflib v4.1.6 and v5.0.4.

I'm working on a patch to gif2webp.c so that it compiles for both these versions of giflib. Later you can try to convert your image with giflib 5.0.4.

Thanks,
Urvang

P.S. Can you give me an idea of how frequent is this issue? Have you seen any other images which don't convert correctly? Or is this a one-off case?

Pascal Massimino

unread,
Jan 8, 2013, 1:24:27 PM1/8/13
to webp-d...@webmproject.org
Hi Urvang,

On Tue, Jan 8, 2013 at 1:17 AM, Urvang Joshi <urv...@google.com> wrote:
Hi Rüger,
It seems that this is due to a bug in v4.1.6 of giflib. [This is the version that is installed when you run "sudo apt-get install libgif-dev"].


worth adding to the FAQ (or similar, more bug-related) page...

Urvang Joshi

unread,
Jan 8, 2013, 5:29:42 PM1/8/13
to webp-d...@webmproject.org
Hi,

On Tue, Jan 8, 2013 at 1:54 PM, <literatur...@googlemail.com> wrote:


P.S. Can you give me an idea of how frequent is this issue? Have you seen any other images which don't convert correctly? Or is this a one-off case?



I didn't find anything like this on other Gifs.

Alright, that's good to know!

Btw, I just sent a patch: https://gerrit.chromium.org/gerrit/#/c/40619/, which will make gif2webp work with different versions of giflib (tested it on v4.1.6 and v5.0.4).

If you want to try out running gif2webp with giflib v5.0.4, you can compile it from source:
- First remove giflib v4.1.6 to avoid any version conflicts:
  sudo apt-get remove libgif-dev


- Extract the files and install giflib from source:
  cd giflib-5.0.4
  ./configure; make; sudo make install

- You might have to set LD_LIBRARY_PATH to point to this gif library path:
  export LD_LIBRARY_PATH=/usr/local/lib/:${LD_LIBRARY_PATH}

- Go to your libwebp directory and build gif2webp as usual:
  make -f makefile.unix examples/gif2webp

Thanks,
Urvang

--
You received this message because you are subscribed to the Google Groups "WebP Discussion" group.

alta...@gmail.com

unread,
Jun 17, 2013, 4:36:49 AM6/17/13
to webp-d...@webmproject.org
Anyway to control the frame of animated webp image via Javascript.

James Zern

unread,
Jun 17, 2013, 8:29:14 PM6/17/13
to webp-d...@webmproject.org, alta...@gmail.com


On Monday, June 17, 2013 1:36:49 AM UTC-7, alta...@gmail.com wrote:
Anyway to control the frame of animated webp image via Javascript.


You could parse the file in javascript and update the <img> src, I don't know of an existing solution. The container document is here [1] and contains a section on animation [2]


alta...@gmail.com

unread,
Jun 18, 2013, 2:03:11 AM6/18/13
to webp-d...@webmproject.org, alta...@gmail.com
Yes I can always the src via JS, but that might cause a lag, yes i can preload that too. 

Those links contain the techy details about the container itself but anyway thanks for your reply. 

Google should give some way to control the keyframe via JS. :)

oX Triangle

unread,
Jun 18, 2013, 7:15:56 AM6/18/13
to webp-d...@webmproject.org
maybe u can modify the JSlib behind http://webpjs.appspot.com/
for controling webp-chunks

yuanjun Li

unread,
Jun 18, 2013, 11:20:48 AM6/18/13
to webp-d...@webmproject.org
Hello everyone, I am confuse with webp when I want to store images as webp in my app server. 
Is there anything else I should do if I received images data from my android client?


2013/6/18 oX Triangle <oxdos...@googlemail.com>
maybe u can modify the JSlib behind http://webpjs.appspot.com/
for controling webp-chunks

--
You received this message because you are subscribed to the Google Groups "WebP Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webp-discuss...@webmproject.org.

To post to this group, send email to webp-d...@webmproject.org.

James Zern

unread,
Jun 18, 2013, 7:15:30 PM6/18/13
to webp-d...@webmproject.org, alta...@gmail.com


On Monday, June 17, 2013 11:03:11 PM UTC-7, alta...@gmail.com wrote:
Yes I can always the src via JS, but that might cause a lag, yes i can preload that too. 

Those links contain the techy details about the container itself but anyway thanks for your reply. 

Google should give some way to control the keyframe via JS. :)

 
That's a bit beyond webp, you're talking about modifying <img> behavior or potentially a follow-up, <picture>?. For the time being JS is your option to parse the container and feed down the individual frames to img.src. That or <video>... 

alta...@gmail.com

unread,
Jun 19, 2013, 6:16:55 AM6/19/13
to webp-d...@webmproject.org, alta...@gmail.com
Yes, at least for now going with video is a better option i believe. 

ALTAF

unread,
Jun 19, 2013, 6:15:25 AM6/19/13
to webp-d...@webmproject.org
Yes, at least for now going with video is a better option i believe. 


--
Regards,
ALTAF.K


Reply all
Reply to author
Forward
0 new messages