php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #80828 Add support for HEIF
Submitted: 2021-03-04 09:27 UTC Modified: 2021-10-15 17:32 UTC
Votes:46
Avg. Score:4.8 ± 0.4
Reproduced:43 of 43 (100.0%)
Same Version:33 (76.7%)
Same OS:26 (60.5%)
From: martin at auswoeger dot com Assigned:
Status: Open Package: GD related
PHP Version: 7.4.15 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
32 - 26 = ?
Subscribe to this entry?

 
 [2021-03-04 09:27 UTC] martin at auswoeger dot com
Description:
------------
Support for AVIF and HEIF was recently added to libgd:  
https://github.com/libgd/libgd/commit/f2aa2836ed910ca3510585a47a8a064b5140e148  
https://github.com/libgd/libgd/commit/39c4644fa01f6b9f002119e4109e252bc665b8f1

It would be great if the following functions could be implemented in the PHP GD extension:  
imageavif()  
imageheif()  
imagecreatefromavif()  
imagecreatefromheif()

As well as adding support for the new formats in getimagesize() and similar functions and adding the constants IMAGETYPE_AVIF and IMAGETYPE_HEIF.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-03-04 10:22 UTC] cmb@php.net
See also request #77757.
 [2021-03-15 22:02 UTC] morss at google dot com
Not to mention request #78832.
 [2021-03-15 22:04 UTC] morss at google dot com
See also discussion of the getimagesize() problem here:

https://github.com/php/php-src/pull/5127
 [2021-03-17 22:04 UTC] morss at google dot com
Martin, I'm planning to port over the AVIF support from gd. Maybe you'd like to work on the HEIF support?

Meanwhile, getimagesize() support for AVIF is being discussed in https://github.com/php/php-src/pull/5127.
 [2021-07-05 06:58 UTC] benjamin dot frugoni at gmail dot com
This should have started the moment Android and Microsoft said that this format would be natively accepted, or when Safari included HEIF or when the whole 67% of navigators said they would support it.

I thought we would be ahead of the curve, not trailing behind it. But we're still on time if we use the GD binaries
 [2021-10-15 17:32 UTC] cmb@php.net
-Summary: Add support for AVIF and HEIF +Summary: Add support for HEIF
 [2021-10-15 17:32 UTC] cmb@php.net
AVIF is supported as of PHP 8.1.0 (if built against the bundled
libgd or a system libgd with support for AVIF), so I'm changing to
request HEIF support.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 01:01:30 2024 UTC