Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116615 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 47691 invoked from network); 9 Dec 2021 20:29:42 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 9 Dec 2021 20:29:42 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C225418053B for ; Thu, 9 Dec 2021 13:30:28 -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=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL 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-yb1-f176.google.com (mail-yb1-f176.google.com [209.85.219.176]) (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 13:30:28 -0800 (PST) Received: by mail-yb1-f176.google.com with SMTP id y68so16936536ybe.1 for ; Thu, 09 Dec 2021 13:30:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FK6STktH1r0gxNn+qksrbG5QYnmyNyAUCHV9hNhfqPU=; b=XF9prZ3uJF3m3seUGsGIeaICK0XqpU0KYzUqkHDsF3tyOzKc8tZrJF6StqZiw9iuPS rKejD1EnJtXuRG38CeE6xQWy693OoBoFCUPVXoZsZkNOJL2zEgEMwALvSelVBKKWVn/h 714zdlJNnSPocdPFDg2a0R/MWxoWQSU/jnal0HJdhO3e4lxnnacoBHLVYFfrOlbnjFcw Wj29GCn8FIBtpa+RTqQMU8CEM+gYn7Kx08AeATO6tvsrHUb5d6AnntYcTyppNXpSb96g XyZkzDFmX0gPV8KIRRgwu0Zz1/yaZn1FLiTC3a5AW+/S9HdgLJ5Ah705Nky/12VSoUuH Cmgg== 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=FK6STktH1r0gxNn+qksrbG5QYnmyNyAUCHV9hNhfqPU=; b=ryN7FbKkvFPGON7NccyZunGP+ppMA+YkQVeCZ1QnAv+CRR+4HTSS2kcIY1dpoHyytu nN6CVkKZbpW6Egl8rjL8ZxjuYsMOVxMLPLsHwaWFll+UCsSF0ynqLij7udgk3XyvIzXT hC4RPKmXgStrqLwXaA7nwUJWuiRRKcs3gVD3aoBPzknT0Cmvw4OdUxEuJxkBpqayvwvI ftT9uxiJrt7djanceNrDEiZjLTBCPomIiXEGNdWn2JeAmi4ho+rnDTzwmbm05D21dXEj SuHRqU8SoPkVPtCJCsOsDz02NLiUvo3LsBiY6AypuhnkEvvVrCo1NM3jsr3ciFgIvmTP N3Jw== X-Gm-Message-State: AOAM533p8qhp7/ehdRw9N0pZv2ULDTw5nkLmP3nP9hWYmK4MTjCH33ou FV/FOn9gWXqay5RWbrjL680kLDYFmygT7yS6mB0uWQ== X-Google-Smtp-Source: ABdhPJy8YdHQzB43h13M6si1Ybpevuo2aLqvKpZijBhyUO3Ro7djDqgwdkmuc8mNrtmGu+izJ/KadzvTLy1xBWrcOhM= X-Received: by 2002:a25:8711:: with SMTP id a17mr9099691ybl.323.1639085427664; Thu, 09 Dec 2021 13:30:27 -0800 (PST) MIME-Version: 1.0 References: <7c4411c8-8bf6-36f1-36f8-1a7391c2a3d7@gmx.de> In-Reply-To: Reply-To: Ben Morss Date: Thu, 9 Dec 2021 16:30:11 -0500 Message-ID: To: Nikita Popov Cc: "Christoph M. Becker" , PHP internals Content-Type: multipart/alternative; boundary="000000000000ac95da05d2bd50f5" Subject: Re: [PHP-DEV] Re: Finishing AVIF support in getimagesize() From: internals@lists.php.net ("Ben Morss via internals") --000000000000ac95da05d2bd50f5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks for the discussion, everyone! Fortunately there are no licensing concerns, as the author is making this code available to be copied and pasted freely. And we've already got the build flag for avif. I'll be excited to see getimagesize() actually return the size for AVIF images =E2=98=BA=EF=B8=8F On Thu, Dec 9, 2021 at 2:45 PM Nikita Popov wrote: > 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, b= ut >> > simply to return 0 for the actual dimensions and other details. The us= er >> > 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, an= d > we can't expect this to be available as a system library at this time. > > Regards, > Nikita > --000000000000ac95da05d2bd50f5--