Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97612 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30938 invoked from network); 9 Jan 2017 06:27:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Jan 2017 06:27:19 -0000 Authentication-Results: pb1.pair.com smtp.mail=pthreads@pthreads.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=pthreads@pthreads.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pthreads.org from 74.125.82.51 cause and error) X-PHP-List-Original-Sender: pthreads@pthreads.org X-Host-Fingerprint: 74.125.82.51 mail-wm0-f51.google.com Received: from [74.125.82.51] ([74.125.82.51:37744] helo=mail-wm0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A7/24-31343-44D23785 for ; Mon, 09 Jan 2017 01:27:17 -0500 Received: by mail-wm0-f51.google.com with SMTP id c206so17823134wme.0 for ; Sun, 08 Jan 2017 22:27:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pthreads-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=RWeVeiTVwzPttTJXO+FeVk4L+uc7+oaKicwwodGeizc=; b=wHWq/OB9gWVhmBGTtMpIF8sWaV4oWs8kgqJ3smfYG7plaVY/tL6Oy/n3hOgIDfhVlR YFF1P/y5uYvQtgpyvXYoOaC0DhhxUadLyaXo5RAVoKbbM3jZQDhIbOnFJqa7OqALGBcC 3xehz/JHTmxA7xdfoc7Gy+/vWh6txjsAytiAnxUMXErZW+YCufU6syu65S2P5t0YpNlH H5/lWmgoVC4xHa7uS6CjQG/3B64hz4LB3mPdmWRDKRnpYPsbk9uiD52BmcLEtibI3NcX lzkBwcV2UAKdSG+O25umh8UVTYl+BqZWs8NhmE565bw7I0piE4dXwlvKIEJRRdf79vMb 0kJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=RWeVeiTVwzPttTJXO+FeVk4L+uc7+oaKicwwodGeizc=; b=gjK6sD8wSs9uMA8R8YuVDff8UmMp0CmE7CympWP+JjPDQ+hj26omOsY5cYGulcyMUZ NGqkX+QW1b7f9A17403/Jioxk+ykmzban+TMliLN66vWHt+XKBqQiYzfOV7vy5l4i77s Qgzk8wQ6N0QdRRJxcjMx3vpVpKMKdG08PdooHcDDiaXRw+fawUmXhtvEBwk2ABdp6IbZ o+qX7sY/4ANKeIin/82fpJaQcaiFHy96h1J64l0zfJSn3XkATb/DSVNywXyEP3Dfm3ii XBM+9y/+io/Lv22ZP/NPvTJKQzTJ2FgfmNcKYjPEzh+vPIDktf/KIDRMVA152q2Gcs/A V/fA== X-Gm-Message-State: AIkVDXIHzXszSEFZUqWi7dLIvETJCVs4C0kmEf3DDK0rS0N56buRy5lnVUgmCXXd+snUw3OCgNOR3hFC1nw5/Q== X-Received: by 10.28.9.80 with SMTP id 77mr3908638wmj.68.1483943232900; Sun, 08 Jan 2017 22:27:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.80.176.4 with HTTP; Sun, 8 Jan 2017 22:27:12 -0800 (PST) X-Originating-IP: [86.178.168.203] In-Reply-To: <2cee1fe1-6dfd-0337-7286-42f873b9f508@gmx.de> References: <2cee1fe1-6dfd-0337-7286-42f873b9f508@gmx.de> Date: Mon, 9 Jan 2017 06:27:12 +0000 Message-ID: To: "Christoph M. Becker" Cc: PHP Internals List Content-Type: multipart/alternative; boundary=001a11444da843ac890545a375d9 Subject: Re: [PHP-DEV] ext/gd: support creation of animated GIFs From: pthreads@pthreads.org (Joe Watkins) --001a11444da843ac890545a375d9 Content-Type: text/plain; charset=UTF-8 Morning Christoph, We have to face facts: Resources are still a thing. While there is talk of switching resources to use opaque objects, I'm worried about introducing a mixture of objects and resources in random places throughout core exts, and having exts with both seems very strange to me. I know that this has already started to happen, but before it goes any further I would implore you to stick to resources for now. There needs to be an organised effort for some future version of PHP to remove the resource type and replace it with opaque (or not) objects. Cheers Joe On Sun, Jan 8, 2017 at 11:53 PM, Christoph M. Becker wrote: > 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] > bbb4c7a8497032f98d062ac418d9fbbe> > [4] > > -- > Christoph M. Becker > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --001a11444da843ac890545a375d9--