Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116587 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 22436 invoked from network); 8 Dec 2021 10:40:16 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 8 Dec 2021 10:40:16 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 00F1D1804F8 for ; Wed, 8 Dec 2021 03:40:42 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS8560 212.227.0.0/16 X-Spam-Virus: No X-Envelope-From: Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 8 Dec 2021 03:40:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1638963638; bh=yN/gRr45PqwI14mHFR0/OAh644ubMEilFBhY6Nto50U=; h=X-UI-Sender-Class:Date:Subject:To:References:From:In-Reply-To; b=IOtz63vo4bbFW7GD7Kj87idFEKjZI3Dx3FZLTUT9XX4XgtD4WlTlkFI17v6aAAVIj Cn/uRquUVymCzllVxObp0JUjuV+idODihMDCgPsbMA2NWq5RnxguN38gc2H9s1N3at rnEVf2M+7eFmYtpC4G0n1A2X9RrIAq5bNzxfHUF0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.2.130] ([84.179.239.183]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MsHns-1mfzzg1nw2-00tkQO; Wed, 08 Dec 2021 12:40:38 +0100 Message-ID: <7c4411c8-8bf6-36f1-36f8-1a7391c2a3d7@gmx.de> Date: Wed, 8 Dec 2021 12:40:37 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Content-Language: de-DE To: Ben Morss , PHP internals References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:wneBXkNS2LG9ligEtUpvio1qv2nfGiRIc+4/9xVf1ApLNIgHlyO fajPV1vwsUBng+gO+L5XjjOqCa3brjQgUoa0wNGwdRUvmMViY703nRAJ3aWpim/xQFJ9/fV 9dVuy7hbG3O81ptKEQdEWSbOKnBKxgke0hE0wmsCqRwteyC1UplgXiyKVlXE/OnYFStQw/U 4jS69g7rbDBQ/nZr2I91A== X-UI-Out-Filterresults: notjunk:1;V03:K0:P9vaErQHVNY=:+dWlrja8RZ+ny1fZ/YFySL V+Fqq2ok5zGy7DAmEC8IPEAhp0humZ3s9clTMYUFfJGdmAWOiHiu4JAgvQ+fnJvS0VGoaPawD LlBXVO8k4DPwfbXSzi5mujl8RZmXZXql3uhBmzaa+3fr91FfbArm9FDUiwcm5xmOWlzVoSuP/ mlivZc4+5HJ7QeCfNgLP8oRnMcRYfJKyvWUIhObCndFsmj5Jf8qypYFXLG6GdKOlO76Qi/kdX bRYYAo38dHsVs8pkAftFfRpzMWAJ8M7JhAJvTZ4NGSMRz6tHFEt+xiUr+yNdg43h8cHlOSLKZ CoJCBylU1ufD6FMX/di8FC8JxQia0XEl96RWvdqwlZ9TdReZhZYfzPRrMICyzDJHMBUmhFtFH s3rNLmtksXfUOLP5KpVIoXssfISjV0zx91IipGMZ4PvRGihFBJ+grjx+pLH1Dia6mzIZEvxj9 O/ikhQ663jFeIhoRoWdgXXP+fHvb/DLYPoB+FC7qbrQPyxEGSGBlyJd3HyqPnzZI8R+L1mGBa nUCkIVExSK5pMs5ZDtcxnzpb54bqxPPycLEO/T8QQ0LAy+fC0KPa7kjG0pA6KnfYM/xXzKQFx UfTm/sJI6jKg8Bw4jA0a0s4xq91X0PyxVDCa4QSfOgrctyiUbG/aRiObO2o/4ffMpmIXTQx4N ZY+4292c8oaRvZ2TAeM2/fmfO8QbLEg5H+Ap1jCx3mpMT2bkfojNH+c2gQWwuiUdDyGvdd1qM V+3wsLoI8VP0tt6Hv0hXjs2PBfA8vW+I/bIV9WJDa1aNJND1RSpwZwiGQ3D+CwG0x0f1cF+20 A5MbNh2OFaf5f9t6VeSkDVnf9ZOky+LnnU976dBc7QaadK5tj6/vCedN1CNLrTujsrIdqjGPU 224Te99pX0HvZSKlKIIjwLke3uxLM8pZfTs+TDpE7dqB96QoDuvib3wHQ0oqS+AWF+nWWCGf1 J6hAFIuN6B6KBWMUwyYV0Z3r6sPka+K28XvfRjq68F/MX2uTO4vjMIJnY7FNt3Iff38acTLHL 1pkHVaZtUTorlVCUVMxi71zJqkYDmCm1x43IDPLl478fjafF05gOJ6omGZyxSSR+wG6JIoW0l RteHU2wLCCFm6g= Subject: Re: Finishing AVIF support in getimagesize() From: cmbecker69@gmx.de ("Christoph M. Becker") On 01.12.2021 at 00:52, Ben Morss via internals wrote: > Earlier this year, I added support for AVIF images > to libgd > . My ultimate goal was to bring support = for > this new image format to PHP, so that the world's top CMSs could let sit= es > serve AVIFs. A few of you kindly guided me as I made my first contributi= ons > to the PHP codebase, propagating libgd's new AVIF support > into PHP's bundled gd fork, > and adding > AVIF awareness to non-gd > functions like getimagesize() and imagecreatefromstring(). > > Unfortunately, when I worked on getimagesize(), AVIF experts advised tha= t > there was no compact, reliable way to determine the size of an AVIF imag= e > without relying on an external library like libavif. We decided > that i= t > was useful to return the information that a given image was an AVIF, but > simply to return 0 for the actual dimensions and other details. The user > would simply need to decode the image to determine this information. > > Of course, users would really like > to use > getimagesize() to return the actual size. So a colleague has kindly > created standalone > code (t= hat > doesn't depend on libavif) to do this, with the goal of adding it to PHP= . > > The code comprises several hundred lines. But - it works, and it works w= ell. > > Would it be ok to submit a PR containing this code to add this > functionality? Or does someone have a superior approach? Thanks for your and your colleague's work! It's highly appreciated. Anyhow, a respective PR[1] has been submitted now, and I'm in favor of bundling libavifinfo. I'm not too concerned regarding the additional size of the PHP binaries which would result by linking it in, but if others are, we could still introduce a configuration option (e.g. `--with-libavifinfo`). Thoughts? Objections to bundling libavifinfo at all? [1] =2D- Christoph M. Becker