From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#54242: Emacs can't display animated webp images Date: Thu, 07 Apr 2022 16:42:44 +0200 Message-ID: <87v8vl9cpn.fsf_-_@gnus.org> References: <86ee3j75aj.fsf@protected.rcdrun.com> <87v8wrewo5.fsf@gnus.org> <87pmmw782g.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8179"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 54242@debbugs.gnu.org To: Jean Louis Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 07 16:44:31 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ncTN9-0001uR-6v for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Apr 2022 16:44:31 +0200 Original-Received: from localhost ([::1]:39888 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ncTN8-0007Rq-6K for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Apr 2022 10:44:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39722) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ncTMg-0007QO-D1 for bug-gnu-emacs@gnu.org; Thu, 07 Apr 2022 10:44:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39202) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ncTMg-00042n-4R for bug-gnu-emacs@gnu.org; Thu, 07 Apr 2022 10:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ncTMg-0007Ce-2l for bug-gnu-emacs@gnu.org; Thu, 07 Apr 2022 10:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Apr 2022 14:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54242 X-GNU-PR-Package: emacs Original-Received: via spool by 54242-submit@debbugs.gnu.org id=B54242.164934258627617 (code B ref 54242); Thu, 07 Apr 2022 14:44:02 +0000 Original-Received: (at 54242) by debbugs.gnu.org; 7 Apr 2022 14:43:06 +0000 Original-Received: from localhost ([127.0.0.1]:33099 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ncTLk-0007BL-EY for submit@debbugs.gnu.org; Thu, 07 Apr 2022 10:43:06 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:50056) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ncTLf-0007Al-A7 for 54242@debbugs.gnu.org; Thu, 07 Apr 2022 10:43:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=pKqbHlPZRK4KJLEmzRvsLk517OKp9rqa4mGCRU91yRM=; b=BWXE8Qs4/6d9PPETge2mETvsIK tNjkRCjbJsZHlFoMdRl5O7+8pafiHM0u/1/oNdqPKU7iqhuAGONOSXBVJuybuEri/1LKY8VCoqdSd uK0S4NzLTlxrcejSWSBbVCiAwrCvsUsVJlEDTCWcb7C7BiJwf5uPiCfb7PdHrU/SjIGs=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ncTLV-00034s-Es; Thu, 07 Apr 2022 16:42:52 +0200 X-Now-Playing: Patrik Torsson's =?UTF-8?Q?=5FKolv=C3=A4teserenader=5F:?= "Flaskposten" In-Reply-To: <87pmmw782g.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 08 Mar 2022 16:55:19 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:229530 Archived-At: --=-=-= Content-Type: text/plain Lars Ingebrigtsen writes: > Here's an example animated webp image, and indeed, Emacs fails at > displaying it: > > https://mathiasbynens.be/demo/animated-webp-supported.webp I've started poking at this just to see what's necessary. As a first attempt, I thought we could at least display the first frame in the animate image, so I did the following according to the er documentation from Google. --=-=-= Content-Type: image/png Content-Disposition: inline Content-Transfer-Encoding: base64 iVBORw0KGgoAAAANSUhEUgAAAaYAAAFDCAIAAAD+mj1lAAAABGdBTUEAALGPC/xhBQAAACBjSFJN AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAA EGNhTnYAAA8AAAAJYAAAB50AAAEnLVZ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EtEQJTR4SEtISJTR5SEhIS5TQ5CEhIS1RQpOHhIS0RAlN HhIS0hIlNHlISEhLlNDkISEhLVFCk4eEhLRECU0eEhLSEqX/D8kbrTuBHjwGAAAAAElFTkSuQmCC --=-=-= Content-Type: text/plain And indeed, I end up with something that looks like a mangled version of the nyan cat in the test URL above -- but with wrong width and height or something? The first image in the animation is very simple, though -- frame width/height is the same as the canvas width height... so I must be doing something obviously wrong: Data: 400 400 400 400 0 0 Anybody spot the obvious error? There's also the "animation" functions from libwebp, but they are even less clear as to how they're supposed to be used. Amusingly, imagemagick also renders the animated webp image wrong, but in a different way. diff --git a/configure.ac b/configure.ac index cda2a04be9..fc409ce8f1 100644 --- a/configure.ac +++ b/configure.ac @@ -2692,6 +2692,7 @@ AC_DEFUN EMACS_CHECK_MODULES([WEBP], [$WEBP_MODULE]) AC_SUBST(WEBP_CFLAGS) + WEBP_LIBS="-lwebp -lwebpdemux" AC_SUBST(WEBP_LIBS) fi if test $HAVE_WEBP = yes; then diff --git a/src/image.c b/src/image.c index 519eafb904..f175be8923 100644 --- a/src/image.c +++ b/src/image.c @@ -9053,6 +9053,7 @@ gif_load (struct frame *f, struct image *img) ***********************************************************************/ #include "webp/decode.h" +#include "webp/demux.h" /* Indices of image specification fields in webp_format, below. */ @@ -9224,19 +9225,61 @@ webp_load (struct frame *f, struct image *img) goto webp_error1; } - /* Decode WebP data. */ - uint8_t *decoded; - int width, height; - if (features.has_alpha) - /* Linear [r0, g0, b0, a0, r1, g1, b1, a1, ...] order. */ - decoded = WebPDecodeRGBA (contents, size, &width, &height); + uint8_t *decoded = NULL; + int width, height, x_offset = 0, y_offset = 0, fwidth, fheight; + + if (features.has_animation) + { + /* Animated image. */ + WebPData webp_data; + webp_data.bytes = WebPMalloc (size); + webp_data.size = size; + memcpy ((void*) webp_data.bytes, contents, size); + + WebPDemuxer* demux = WebPDemux(&webp_data); + width = WebPDemuxGetI(demux, WEBP_FF_CANVAS_WIDTH); + height = WebPDemuxGetI(demux, WEBP_FF_CANVAS_HEIGHT); + + WebPIterator iter; + if (WebPDemuxGetFrame (demux, 1, &iter)) { + do { + fprintf(stderr, "Complete is %d %d\n", iter.complete, iter.has_alpha); + /* Decode WebP data. */ + if (iter.has_alpha) + /* Linear [r0, g0, b0, a0, r1, g1, b1, a1, ...] order. */ + decoded = WebPDecodeRGBA (iter.fragment.bytes, iter.fragment.size, + &fwidth, &fheight); + else + /* Linear [r0, g0, b0, r1, g1, b1, ...] order. */ + decoded = WebPDecodeRGB (iter.fragment.bytes, iter.fragment.size, + &fwidth, &fheight); + x_offset = iter.x_offset; + y_offset = iter.y_offset; + fwidth = iter.width; + fheight = iter.height; + break; + } while (WebPDemuxNextFrame (&iter)); + WebPDemuxReleaseIterator (&iter); + } + WebPDataClear (&webp_data); + WebPDemuxDelete (demux); + } else - /* Linear [r0, g0, b0, r1, g1, b1, ...] order. */ - decoded = WebPDecodeRGB (contents, size, &width, &height); + { + /* Non-animated image. */ + if (features.has_alpha) + /* Linear [r0, g0, b0, a0, r1, g1, b1, a1, ...] order. */ + decoded = WebPDecodeRGBA (contents, size, &width, &height); + else + /* Linear [r0, g0, b0, r1, g1, b1, ...] order. */ + decoded = WebPDecodeRGB (contents, size, &width, &height); + fwidth = width; + fheight = height; + } if (!decoded) { - image_error ("Error when interpreting WebP image data"); + image_error ("Error when decoding WebP image data"); goto webp_error1; } @@ -9266,9 +9309,11 @@ webp_load (struct frame *f, struct image *img) init_color_table (); uint8_t *p = decoded; - for (int y = 0; y < height; ++y) + fprintf(stderr, "Data: %d %d %d %d %d %d\n", width, height, fwidth, fheight, + x_offset, y_offset); + for (int y = y_offset; y < fheight; ++y) { - for (int x = 0; x < width; ++x) + for (int x = x_offset; x < fwidth; ++x) { int r = *p++ << 8; int g = *p++ << 8; --=-=-=--