Koozali.org: home of the SME Server
Contribs.org Forums => Koozali SME Server 10.x => Topic started by: wdepot on November 24, 2024, 12:03:33 AM
-
I'm updating a web site to work with PHP 8.3 and one of the things that was wanted was support for AVIF images, specifically resizing them using GD in PHP. I finished the work for the resizer and tested it to work fine for other image formats but the moment I tried to load an AVIF image it failed to load the image at all which surprised me since AVIF support was supposed to have been added to GD beginning in version 8.1 of PHP. When I used phpinfo() to check the information listed for GD I noticed that AVIF wasn't even mentioned. Is there a way to update the GD version for php-fpm now that SME 10 is past end of life or will I need to wait until SME 11 becomes available?
-
Always worth a quick read around.
"remi php gd avif"
https://stackoverflow.com/questions/71739530/php-8-1-imageavif-avif-image-support-has-been-disabled#71739929
It's a upstream RH/CentOS thing.
https://rpmfind.net/linux/RPM/remi/enterprise/7/x86_64/gd3php-2.3.3-7.el7.remi.x86_64.html
-
Always worth a quick read around.
"remi php gd avif"
https://stackoverflow.com/questions/71739530/php-8-1-imageavif-avif-image-support-has-been-disabled#71739929
It's a upstream RH/CentOS thing.
https://rpmfind.net/linux/RPM/remi/enterprise/7/x86_64/gd3php-2.3.3-7.el7.remi.x86_64.html
I used yum info to check the version of gd3php and it matches the version listed above. It looks like I might need to figure out how to use the Imagick class to accomplish what I was hoping for. I'll have to try and figure out how to pad an image when needed since I didn't spot copying one image into another blank white image at first glance though I suspect it is there somewhere.
I figured out how to install Imagick7 for PHP 8.3 but installing the needed Imagick7-heic failed because
Error: Package: libheif-1.4.0-1.el7.remi.x86_64 (remi-safe)
Requires: libde265.so.0()(64bit)Where do I get libde265.so.0 since it is apparently not in any enabled repository?
Also do you happen to know if the Rocky Linux 9 that will be used in SME 11 will have libavif for gd since it is sort of a sidestep around Red Hat 9?
-
Also do you happen to know if the Rocky Linux 9 that will be used in SME 11 will have libavif for gd since it is sort of a sidestep around Red Hat 9?
SME 11 -> Rocky 8, SME 12 -> Rocky 9, but you could try yourself https://wiki.koozali.org/Sme11BuildQueue#Bare_install_test
-
I used yum info to check the version of gd3php and it matches the version listed above.
OK - so the Remi package has that support it appears. RH/CentOS do not.
Have you actually tested it? Read the changelog in the rpm and the related bugs. Read here.
https://rpmfind.net/linux/RPM/remi/enterprise/7/x86_64/gd3php-2.3.3-7.el7.remi.x86_64.html
https://libgd.github.io/
It looks like I might need to figure out how to use the Imagick class to accomplish what I was hoping for.
Why if you have what you wanted above?
You are hopping from thing to another without really testing anything.
I figured out how to install Imagick7 for PHP 8.3 but installing the needed Imagick7-heic failed because
Error: Package: libheif-1.4.0-1.el7.remi.x86_64 (remi-safe)
Requires: libde265.so.0()(64bit)Where do I get libde265.so.0 since it is apparently not in any enabled repository?
Why do that? That wasn't what you originally asked?
A bit of searching helps you find stuff. Some patience and 5 minutes detective work.
Assuming that this is what you really need to do......
You can see the libheif rpm here:
https://rpmfind.net/linux/RPM/remi/enterprise/7/x86_64/libheif-1.4.0-1.el7.remi.x86_64.html
You can click the requires links which gets you to here:
https://rpmfind.net/linux/rpm2html/search.php?query=libde265.so.0()(64bit)
Which tells you it is likely here:
"RpmFusion Free Updates for RedHat"
So you can look in the wiki for rpmfusion and find this here:
https://wiki.koozali.org/Rpmfusion
And unsurprisingly there is an extrarepo rpm here:
https://wiki.koozali.org/Extrarepositories
Also do you happen to know if the Rocky Linux 9 that will be used in SME 11 will have libavif for gd since it is sort of a sidestep around Red Hat 9?
I already posted you links about this earlier.
Rocky essentially just rebuild RHEL for compatibility. If it isn't there in RHEL it likely won't be there in Rocky, hence extra repos like Remi.
It's an upstream thing. Nothing to do with us. RH/CentOS often remove things or change things that don't fit in with their business. There is a lot of law around some of these image types and the compressors and they may be avoiding that, or wanting to sell their own packages to resolve it.
https://en.wikipedia.org/wiki/High_Efficiency_Image_File_Format
Personally I'd avoid it like the plague.
-
php83 -i | grep AVIF
returns nothing
on rhel8 /rocky8 it does return that it is enabled but there was for long time no libavif available. sound like remi provides it now.
to install imagick7 you need deps from rpmfusion.
see https://stackoverflow.com/questions/71739530/php-8-1-imageavif-avif-image-support-has-been-disabled