Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116609 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 35790 invoked from network); 9 Dec 2021 18:59:30 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 9 Dec 2021 18:59:30 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2164B18053D for ; Thu, 9 Dec 2021 12:00:14 -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_H3,RCVD_IN_MSPIKE_WL,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-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) (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 12:00:10 -0800 (PST) Received: by mail-pg1-f181.google.com with SMTP id r5so6047463pgi.6 for ; Thu, 09 Dec 2021 12:00:10 -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=E5fWDKBkhfQuXV3n5PGUvhoAsrsyorz+oijkLxf0If0=; b=I9ry/FNUmPlaDsty3NV7nl0uVETXFFlbjyWtkUrO0rKvtkf3tLlcB6dsT5DNeNeUGj o3EuY4mRS/6HBE5AnwaPdGdHzkg/lpJYc91DjWZPHnciNop88HtGlnC4B1KMIUfsLOWv VzY7GrDckk1U/+k6aHuoHjDl+3ET35flBLS/PRzmdzNEwPsiWsqeZxJIVCodxHS5zFw7 3nAPUOeSWq7gv4QHkuRT99BWxek3AOg31YulN+NfDT+zgXb8C8jhfQFbX/8o1pMrwY4h 2UjXmJhQ0YOlDsjJgglC6/2vZ2kP9Kx+qbTN9WX+Fs74hR2f5h6g5z8a07kdQXlzTLZ5 RC2g== 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=E5fWDKBkhfQuXV3n5PGUvhoAsrsyorz+oijkLxf0If0=; b=L872jVPKiMEJ9a+M++mWWq+O0sZivpQZe1ZqK5VY1K8+OxbIqzSCZtnbGimyvLEKak +vtEq/tQ3fdMVdXNyPVxb5I9jb9GbihQkK5T6bU7cqSUIKJ6KzGnuZMZxKPBtCDij1o1 6viHX7pUXSOkFvYuz7EpCH0flzXj3763qNdx4fMX16Qjfdn54SVsSZoNFCDMxRZeyLpl +w7h/YqSV0sRtFXyVhKQOXgLrV+udI9fP7edjAQIyKYpNbSj5tm1YHSLYZVSMJXiuPGj bIfd09xcvFlA9lSIs1Xu8fIJBNZcJRVfcQzbNdXcP36C3UXaMfOjAQnN4LXY+8alBWnS YBWw== X-Gm-Message-State: AOAM532C9kW0JoMT4u4kMsklg2b1yMiqdg0U9VlDNjNgrKZxUO2pJnlk R1TOyhsF1RRH6qXtZToxEJZlL6ykNNZgXyCvSH4= X-Google-Smtp-Source: ABdhPJxWpyq414Djkv5NreJ4x/ASqpMtdNnKIsG378VxORKjVBYuTaWafeBy0KVQC7BwG6+4qAga+4oe+gXUHuoAqLI= X-Received: by 2002:a05:6a00:2405:b0:4a8:3294:743e with SMTP id z5-20020a056a00240500b004a83294743emr13497350pfh.61.1639080009628; Thu, 09 Dec 2021 12:00:09 -0800 (PST) MIME-Version: 1.0 References: <7c4411c8-8bf6-36f1-36f8-1a7391c2a3d7@gmx.de> In-Reply-To: Date: Thu, 9 Dec 2021 16:59:58 -0300 Message-ID: To: Nikita Popov Cc: "Christoph M. Becker" , Ben Morss , PHP internals Content-Type: multipart/alternative; boundary="000000000000bb7f6505d2bc0d08" Subject: Re: [PHP-DEV] Re: Finishing AVIF support in getimagesize() From: flaviohbatista@gmail.com (=?UTF-8?Q?Fl=C3=A1vio_Heleno?=) --000000000000bb7f6505d2bc0d08 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Dec 9, 2021 at 4:46 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 > > > tha= t > > 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 work= s > > 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. T= he > 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 > Although I'm not a core contributor, my 2c is that even with libavifinfo bundled, a configuration option is very welcome, the same way we have for png, jpeg, xpm and webp. As *cmb* said, thanks for your and your colleague's work! --=20 Atenciosamente, Fl=C3=A1vio Heleno --000000000000bb7f6505d2bc0d08--