Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116608 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 33871 invoked from network); 9 Dec 2021 18:45:11 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 9 Dec 2021 18:45:11 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 07F2F180507 for ; Thu, 9 Dec 2021 11:45:57 -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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) (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 ; Thu, 9 Dec 2021 11:45:56 -0800 (PST) Received: by mail-ed1-f52.google.com with SMTP id e3so23424458edu.4 for ; Thu, 09 Dec 2021 11:45:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YZUzOXWoQ8uDwE6ZJqCIh1YdjKe+Lo6a15kourUbDhc=; b=gWqA4+mKzBDntGJGr4wASF4k1XrxW3B/9PQivf9uuZ+isgn6O2eRP3n56aAEtF1Iie ZfOyPaGWHAA7eBu82CU4FX97FvFJwBKMuJNywPVffjybmk3oNcw00VnZp+rlPpimd120 zIzcVI5nTUfL4Cw4czrnKFQcAZ+5u76UZtmBSXzxFzahMvRyw4WkvdO6qIK2iXIk5KVH 21F/AvswiyFaatQ5owvkDbYFA9hdfhYXYeyvWsBeOW9NemksvVIY1EoujTeWf3t/4v7d FoSJEnNWMOTf71XEcEBe7z668SQ4eWp7XNGYNWKpZZQ88rf2IRPbDIKaK44gnw0B79KQ fROg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YZUzOXWoQ8uDwE6ZJqCIh1YdjKe+Lo6a15kourUbDhc=; b=dBiGdfSOd0664tuoPmf3Ky76PHG66uo2jFIpfWHNUBOpmvWwJurSnQ569x1eXSZimh NQ1sGqSLtsqGd7Z/5dp+0nHmXnvRZCi3jBK6kt3T1CY0GPJERHNIqT8pA/MyXmvPktGi flUMiS3CFugsDw+1N+EoQi/VtG9Q/CXpJnKIO8s/iJP8Fitvkz27e/YJfI5nkGc4HKk8 ZXqveUtUDWwdkPSthHL0jQb3+tbGsxso63ecWUs/gDXNAz38CK8Hz2BK+H02mXojyZuR obdfMsN/y4jGBl6dcGmggd4592WVwf5HV91dpCGodMsXwpGLzvwY/eHug/54NYp0hKo/ HGDw== X-Gm-Message-State: AOAM530cPRzJX+sjEREEfw4CnnTM1puua+KA+R3sDtom74zge1ACGbG+ z+d+XUtcmr8/X81Q/kpR7nO6Gq9LhKHhiyxvvRI= X-Google-Smtp-Source: ABdhPJwqrBNLMdVnCmJeom3Rr6aVMSuVJLg0yr8vfbiBg+JQjRJtTvvyOBmBZj90XsLGYMrQisFib9wt7fmSSQsyMBg= X-Received: by 2002:aa7:cc09:: with SMTP id q9mr32418681edt.102.1639079154611; Thu, 09 Dec 2021 11:45:54 -0800 (PST) MIME-Version: 1.0 References: <7c4411c8-8bf6-36f1-36f8-1a7391c2a3d7@gmx.de> In-Reply-To: <7c4411c8-8bf6-36f1-36f8-1a7391c2a3d7@gmx.de> Date: Thu, 9 Dec 2021 20:45:37 +0100 Message-ID: To: "Christoph M. Becker" Cc: Ben Morss , PHP internals Content-Type: multipart/alternative; boundary="000000000000c4fb2505d2bbda6f" Subject: Re: [PHP-DEV] Re: Finishing AVIF support in getimagesize() From: nikita.ppv@gmail.com (Nikita Popov) --000000000000c4fb2505d2bbda6f Content-Type: text/plain; charset="UTF-8" On Wed, Dec 8, 2021 at 12:41 PM Christoph M. Becker wrote: > 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 > sites > > serve AVIFs. A few of you kindly guided me as I made my first > contributions > > 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 that > > there was no compact, reliable way to determine the size of an AVIF image > > without relying on an external library like libavif. We decided > > that > it > > 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 > (that > > 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 > well. > > > > 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] > Assuming no licensing concerns, bundling libavifinfo sounds reasonable. The library is small, our avif functionality is incomplete without it, and we can't expect this to be available as a system library at this time. Regards, Nikita --000000000000c4fb2505d2bbda6f--