php-imagine / Imagine

PHP Object Oriented image manipulation library
https://imagine.readthedocs.io
Other
4.42k stars 530 forks source link

Add support for AVIF format #742

Closed jonnitto closed 2 years ago

jonnitto commented 3 years ago

Currently, these files formats are supported: jpg, jpeg, gif, png, wbmp, xbm, webp, and bmp

But there is already the next generation of image formats here: AVIF. You can read more about it here

With this option, we could even serve faster websites with PHP and this library 🚀

ausi commented 3 years ago

👍 AVIF support would be great!

But I think we have to wait until the underlying libraries that Imagine uses add support the AVIF format:

SoftCreatR commented 3 years ago

Imagick already supports AVIF. It just depends on the installed ImageMagick version and the installed/compiled delegates:

image

As for the ImageMagick installation (including HEIF/HEIX/AVIF), you may check this out: https://github.com/SoftCreatR/imei

jonnitto commented 3 years ago

@ausi Could create an issue for GMagick?. I already created also one for imagine/imagine package doesn't support avif yet.

SoftCreatR commented 3 years ago

@jonnitto The problem is, that GMagick is just a wrapper around GraphicsMagick and according to this list, neither HEIC nor AVIF is supported by GraphicsMagick, yet.

Renkas commented 3 years ago

But why not open a issue in GraphicsMagick's tracker then?

markusguenther commented 3 years ago

But why not open a issue in GraphicsMagick's tracker then?

Found this repository but not sure if they are using github somewhere? https://sourceforge.net/p/graphicsmagick/code/ci/default/tree/

ausi commented 3 years ago

It seems that there is interest in supporting AVIF from @bobfriesenhahn (the maintainer of GraphicsMagick): https://sourceforge.net/p/graphicsmagick/discussion/250738/thread/3082583888/

The issue tracker for feature requests is hosted here I think: https://sourceforge.net/p/graphicsmagick/feature-requests/

ausi commented 3 years ago

Pull request for AVIF support in Imagick driver: #759

bobfriesenhahn commented 3 years ago

On Sat, 13 Feb 2021, Martin Auswöger wrote:

Pull request for AVIF support in Imagick driver: #759

I am a bit confused. I am the main GraphicsMagick developer, but have nothing to do with Imagine.

If someone is able to contribute good AVIF support for GraphicsMagick, that would certainly be appreciated.

Since the available AVI encoders/decoders are external software (and there are competing implementations) it might not be too hard to implement this.

Bob -- Bob Friesenhahn bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt

ausi commented 3 years ago

I am the main GraphicsMagick developer, but have nothing to do with Imagine.

Imagine is based on three different PHP extensions, one of them is Gmagick which itself uses GraphicsMagick. That’s why Imagine can only support AVIF once the underlying libraries themselfs support this format (that is what I tried to point out in this GitHub Issue ☺️).

I am a bit confused.

I guess you are receiving these emails because I mentioned your GitHub username in https://github.com/avalanche123/Imagine/issues/742#issuecomment-724598244 🙂

bobfriesenhahn commented 3 years ago

On Sat, 13 Feb 2021, Martin Auswöger wrote:

I am the main GraphicsMagick developer, but have nothing to do with Imagine.

Imagine is based on three different PHP extensions, one of them is Gmagick which itself uses GraphicsMagick. That’s why Imagine can only support AVIF once the underlying libraries themselfs support this format (that is what I tried to point out in this GitHub Issue ☺️).

I am a bit confused.

I guess you are receiving these emails because I mentioned your GitHub username in https://github.com/avalanche123/Imagine/issues/742#issuecomment-724598244

Ok, got it. Hopefully there will be time to add AVIF support in the future.

Bob -- Bob Friesenhahn bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt

mlocati commented 2 years ago

This is done in #759. PHP 8.1 adds support for AVIF to GD too (still to be implemented)