Hi Ben,
Thank you for opening this PR and the discussion. With the wide
availability of AVIF/AV1 support in browsers, I think this will fit
nicely.

We have the Namespaces in Bundled Extensions RFC
(https://wiki.php.net/rfc/namespaces_in_bundled_extensions) passed, so
perhaps, the new functions are probably better in the `Gd` namespace?
This would mean the new functions would be `\Gd\imagecreatefromavif`
and `\Gd\imageavif`. They are inconsistent with the existing functions
of course, but I thought to mention it because it's a recent proposal
and I don't think we added new functions after that RFC. Some examples
are recently renamed PHP classes in IMAP, Pgsql, LDAP, and FTP
extensions to follow this new proposal.

---
Thank you.

Ayesh.

On Fri, Jun 4, 2021 at 8:06 PM Ben Morss via internals
<internals@lists.php.net> wrote:
>
> Hello, everyone!
>
> Earlier this year, I added support for AVIF images
> <https://github.com/libgd/libgd/pull/671> to libgd
> <https://github.com/libgd/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. Recently, @Christoph M. Becker <cmbecke...@gmx.de> and Nikita
> have kindly been guiding me as I created a PR to propagate libgd's AVIF
> support into PHP's bundled gd fork. This would create two new PHP functions
> for systems with gd enabled: imagecreatefromavif() and imageavif().
> Additionally it would add AVIF awareness to imagetypes().
>
> This PR <https://github.com/php/php-src/pull/7026> now looks ready to go.
> Christoph advised me to write to this list to ask folks to take a look, and
> to see if there are any objections to merging it!
>
> If the group approves the first PR, my plan is to finish another PR
> <https://github.com/php/php-src/pull/7091> to add AVIF support to the
> non-gd image function getimagesize() . In the same PR, I plan to add
> support to PHP's internal _php_image_type() function, which is used in
> imagecreatefromstring().
>
> Thanks for your help with all of this!
>
>
> All best,
>
> Ben Morss

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to