Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97605 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2519 invoked from network); 8 Jan 2017 23:53:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Jan 2017 23:53:28 -0000 Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.17.21 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.17.21 mout.gmx.net Received: from [212.227.17.21] ([212.227.17.21:53661] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 61/CF-31343-5F0D2785 for ; Sun, 08 Jan 2017 18:53:27 -0500 Received: from [192.168.2.109] ([217.82.227.120]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M6B6s-1cf0gH1q8Y-00yA3I for ; Mon, 09 Jan 2017 00:53:19 +0100 To: PHP Internals List Message-ID: <2cee1fe1-6dfd-0337-7286-42f873b9f508@gmx.de> Date: Mon, 9 Jan 2017 00:53:22 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:k+0vKcsTXYP2YIqiO0em3fMh6HEISvjjJNV/rgHM2TzhQFg8cd2 mkp8ff3G78IHOVIkGI13oMDqNdNlEd/v0eJ3AtBsRkCKhpQKFuaqW4w1aLGcvkffpbV7u+D 65/XvovO7xPk32RQrJCHeJn90N5tZ1V2dzS6Y+f3RLW96rk8qhIztDNf5TD9NMBJQeO7/X6 hGt1oONXWqhlbxL2xxn3A== X-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p0Ncka86mNPEXxZ3/yePSpksSAXDgwnW uaUjSm98YrLC3vu4TNVAf1Y= Subject: ext/gd: support creation of animated GIFs From: cmbecker69@gmx.de ("Christoph M. Becker") Hi! A while ago I've grabbed up and submitted PR #2024[1]. This lay dormant until recently when Joe had a look at so many PRs (thanks!), so I'm bringing this issue to your attention. I presume nobody is opposed that ext/gd should support the creation of animated GIFs (they appear to be still in fashion again), but I'm not sure about the API. My first shot (as implemented in the PR) was to offer a rather minimal layer over gdImageGifAnimBeginCtx(), gdImageGifAnimAddCtx() and gdImageGifAnimEndCtx()[2] (you can see an usage example in the submitted PHPT[3]). Kalle raised some objections regarding the direct use of streams in the API, namely that imagegifanimbegin() expects an open stream to be passed as parameter, so perhaps it would be better to accept a stream URL instead and manage the stream behind the scenes. That appears to be much more solid (as the developer couldn't fiddle with the stream), but would require some encapsulation mechanism, either a resource, what would be in line with the other GD resource types[4], or an (opaque) object, what appears more suitable for PHP 7. Currently, I'd prefer an *opaque* object which would be created by imagegifanimbegin() (creating the respective stream internally), passed to imageanimadd() and be destroyed by imagegifanimend(). Before proceeding to the implementation, I'd like to hear your thoughts about that! [1] [2] [3] [4] -- Christoph M. Becker