Issue 504 in webp: gif2webp fails to convert apparently working GIF files

88 views
Skip to first unread message

david… via monorail

unread,
Feb 8, 2021, 9:04:27 AM2/8/21
to webp-d...@webmproject.org
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 504 by david...@bachtrack.com: gif2webp fails to convert apparently working GIF files
https://bugs.chromium.org/p/webp/issues/detail?id=504

What steps will reproduce the problem?
1. Download the attached files gifbug1.webp and gifbug2.webp
2. gif2webp gifbug1.gif -o gifbug1.webp
OR
2. gif2webp gifbug2.gif -o gifbug2.webp

What is the expected output? What do you see instead?
I expect to see working .webp files
I get the following terminal output:

iMac ~/temp> gif2webp gifbug1.gif -o gifbug1.webp
ERROR (WEBP_MUX_NOT_FOUND): Could not fetch loop count.
GIFLib Error 0: Unknown error
iMac ~/temp>

What version of the product are you using? On what operating system?

gif2webp -version
WebP Encoder version: 1.1.0
WebP Mux version: 1.1.0

macOS Catalina v 10.15.7

Please provide any additional information below.

Both gif files can be opened in GIMP just fine. If I open a file in GIMP and resave it, the resulting file converts to webp without a problem.

I have around 800 other GIF files which convert without a problem.

Attachments:
gifbug1.gif 22.0 KB
gifbug2.gif 25.7 KB

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

pasca… via monorail

unread,
Feb 8, 2021, 10:35:01 AM2/8/21
to webp-d...@webmproject.org
Updates:
Status: Started

Comment #1 on issue 504 by pasca...@gmail.com: gif2webp fails to convert apparently working GIF files
https://bugs.chromium.org/p/webp/issues/detail?id=504#c1

Thanks for the report!

The problem seems to be that there's only 1 frame in the 'animation' and yet we try to store a loop-count as it was signaled in the original GIF.

https://chromium-review.googlesource.com/c/webm/libwebp/+/2679696 should take care of this corner case...

bugdroid via monorail

unread,
Feb 8, 2021, 6:14:25 PM2/8/21
to webp-d...@webmproject.org

Comment #2 on issue 504 by bugdroid: gif2webp fails to convert apparently working GIF files
https://bugs.chromium.org/p/webp/issues/detail?id=504#c2

The following revision refers to this bug:
https://chromium.googlesource.com/webm/libwebp/+/373eb170f1428a011552e6cc72d404aba2b9d8b5

commit 373eb170f1428a011552e6cc72d404aba2b9d8b5
Author: Pascal Massimino <pascal.m...@gmail.com>
Date: Mon Feb 08 22:00:48 2021

gif2webp: don't store loop-count if there's only 1 frame

BUG=webp:504

Change-Id: Iacea11a861096ae950379c872d9840bdbec42a21

[modify] https://crrev.com/373eb170f1428a011552e6cc72d404aba2b9d8b5/examples/gif2webp.c

pasca… via monorail

unread,
Feb 9, 2021, 12:38:18 AM2/9/21
to webp-d...@webmproject.org
Updates:
Status: Fixed

Comment #3 on issue 504 by pasca...@gmail.com: gif2webp fails to convert apparently working GIF files
https://bugs.chromium.org/p/webp/issues/detail?id=504#c3

should be fixed now, please give the patch a try if you have the opportunity!

david… via monorail

unread,
Feb 9, 2021, 5:00:34 AM2/9/21
to webp-d...@webmproject.org

Comment #4 on issue 504 by david...@bachtrack.com: gif2webp fails to convert apparently working GIF files
https://bugs.chromium.org/p/webp/issues/detail?id=504#c4

I’ve tried the patch and it works fine on both examples.

Thanks for the super-rapid response!

D.

david… via monorail

unread,
Feb 9, 2021, 11:45:41 AM2/9/21
to webp-d...@webmproject.org

Comment #5 on issue 504 by david...@bachtrack.com: gif2webp fails to convert apparently working GIF files
https://bugs.chromium.org/p/webp/issues/detail?id=504#c5

Question: I now need to install gif2webp on my Linux server (Centos v 7.6.1810). I’ve downloaded the executable, but this requires an external library (glibc 2.29 or greater). The newest version of glibc on my standard Centos distro is 2.17.

Can you tell me where I might find a safe rpm with a glibc of 2.29 or greater? (I gather the current release is 2.31). Alternatively, is it possible to compile a version of gif2webp with glibc statically linked (as you’ve done for Mac OS)?

I realise this isn’t part of the bug, but any help appreciated!

jz… via monorail

unread,
Feb 9, 2021, 7:34:07 PM2/9/21
to webp-d...@webmproject.org

Comment #6 on issue 504 by jz...@google.com: gif2webp fails to convert apparently working GIF files
https://bugs.chromium.org/p/webp/issues/detail?id=504#c6


> Question: I now need to install gif2webp on my Linux server (Centos v
> 7.6.1810). I’ve downloaded the executable, but this requires an external
> library (glibc 2.29 or greater). The newest version of glibc on my standard
> Centos distro is 2.17.
>
> Can you tell me where I might find a safe rpm with a glibc of 2.29 or
> greater? (I gather the current release is 2.31). Alternatively, is it
> possible to compile a version of gif2webp with glibc statically linked (as
> you’ve done for Mac OS)?

I think it might be easier for you to build for the target if you have access
to the hardware, especially if you want the fix for this bug before we make
another release. The autoconf build will handle detecting the prerequisites,
you'll need a compiler and development files for giflib, then ./configure
--prefix=<install prefix> --enable-everything should be enough to build
gif2webp. The README gives a bit more detail [1].

[1] https://chromium.googlesource.com/webm/libwebp/+/refs/heads/1.2.0/README

david… via monorail

unread,
Feb 10, 2021, 5:47:19 AM2/10/21
to webp-d...@webmproject.org

Comment #7 on issue 504 by david...@bachtrack.com: gif2webp fails to convert apparently working GIF files
https://bugs.chromium.org/p/webp/issues/detail?id=504#c7

OK, thanks. I didn’t want to use my actual server for the build, but I used a docker instance of Centos 7 and built it successfully. Now all working on my server as well as my Mac dev machine.

Thanks again for your help.

D.
Reply all
Reply to author
Forward
0 new messages