Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101801 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17505 invoked from network); 7 Feb 2018 16:31:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Feb 2018 16:31:44 -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.20 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.17.20 mout.gmx.net Received: from [212.227.17.20] ([212.227.17.20:38023] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6A/FD-49805-DE92B7A5 for ; Wed, 07 Feb 2018 11:31:43 -0500 Received: from [192.168.2.105] ([87.167.204.39]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Lk81O-1fG2Ua1z2Y-00cDHq for ; Wed, 07 Feb 2018 17:31:38 +0100 X-Mozilla-News-Host: news://news.php.net:119 To: PHP Internals Message-ID: <12636a53-48a8-9be4-c2cc-a7e4a16a8ba8@gmx.de> Date: Wed, 7 Feb 2018 17:31:37 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:F9jWHTnL6HwV/ZIfJ+fyGSMXuGFgtbIhw5ZnxlbJ0T5jog1oL/r p/Mbw+fi3cqqRk626bw2YevrFt8yqbPb80hW9ZR7hCyd9oLHdJr6pTa0dSvDKuWTYNq074k sCPWH75c9haccVNUoS8mYAUWLJWV55vZbVmPEX3jSeMFemfbNL1R6eiSZe4Z0afVvwYJeHK MwWJd2Hw/g61p6gtZaZCw== X-UI-Out-Filterresults: notjunk:1;V01:K0:ww5N/5hajAw=:UwcRftpyWpglP4ewyHAnaG xEYT3pkTtd6sJNBc0LF0qoEkJp1II1p0zJ/fTWVnYpPwhE1D3PLSjYhl6zvQEbnmJyG541h8w tfKG4XtriW35SRvoIajg3btDklSBFVetxNDAzR3v8Fz+dbD6ebpSDpApR2s/ltmk8PuQaaaeM pv3GUf+PpY3qI22JuvIKwIaZfQg5NHMZ0pglx5LTp/qbPnxuc8jXzORJVW9XPs/9tfisesY0J phqbJZvyRxK04XacUDiZOKSNF0oHvFdapRs/4QAedUKzVxL4kZcpQXbtVcvJ1LX20UPYZ0Iv/ xsCb1HZEWflMuqMLJtoGDaxJU3iPqlpXkodmpIfJtxhZRu6UV76UIDWSInb3qWdpcNAueMvz0 gV7NMxHixDlbrPn8SNrdx/7aldAOgd31WztDtUb4PN0G+ncqOWqr0KtySoxe6QdTumHS2tDTO L6koZI8mh7MBsiD7c6GhMjl999bJ1SRuwIBbyUDkg7XimSnK1E87tOuCveZNQikrVvBG0tm6u X0Vb7J6EB+t8xMeDewRuNK9o1HsMoA7jIyjgMwiRgLq5DmVTFXRmm6uy25Lw8AbA8MguKq+dk iGSX/onLlHAo0kWeCAVOMZGRrH9mjyDvwI59R91JSUyGxIqGO7+PxtXJdeh7fIjA0IEw4voZj uG9nbFf17USukg/t7D4rFYJ3rwWAYFnkIIVtzM7r4zFh0LZYlPyPypqoNeTU/B48JUktT8R/3 1WA82O63LhnVdzKwQ27XG+pRdWbXDOOP7/Wp6I/paceNs1JAyBZNMHyhvdRJwZxF+1zzOcJai QmsJskR4Q8JR+qpCo0Qnne0InCWM/SMLpMs0wQCBP6nv5ftfJs= Subject: Replaced the bundled libgd with upstream (aka. system) libgd From: cmbecker69@gmx.de ("Christoph M. Becker") Hi everybody! During the discussion of PR 3080[1] the idea to replace our bundled libgd with an (unmodified) upstream libgd[2] has come up again. It seems this issue deserves its own discussion, and probably an RFC. Our bundled libgd (particularly as found in master) is mostly compatible with upstream libgd 2.2.5 – actually, the API is compatible, but there are several (mostly minor) implementation differences. For instance, the $threshold parameter of imagecropauto($im, IMG_CROP_THRESHOLD) is interpreted differently[3], the result of imagettfbbox() is slightly different[4] and imagetruecolortopalette() uses a completely different algorithm if built with libimagequant (which is not available for the bundled libgd)[5]. Another important difference is that our bundled libgd uses ZendMM, but upstream libgd does not[6]. For most Linux environments PHP is built with an upstream (system) libgd; on Windows usually the bundled libgd is used. Users targeting both platforms likely already have conditional code (using `GD_BUNDLED`) to cater to relevant implementation differences. So, assuming we would not set `GD_BUNDLED` anymore after bundling upstream libgd, most users would not notice a difference. However, the PHP manual explicitly recommends to use the bundled libgd[7], so users heeding this advice would face several minor BC breaks. The main benefit of bundling upstream libgd, though, would be to save time by avoiding the 2-way synchronizations (which often occur on a per commit basis, and may even sometimes be overlooked). Any thoughts are welcome! [1] [2] [3] [4] [5] [6] [7] -- Christoph M. Becker