-
Notifications
You must be signed in to change notification settings - Fork 674
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Add support for AVIF files in GIFBuilder
The Image AVIF format is supported by "libgd" since PHP 8.1 which can now be used to create images by GIFBUILDER. See https://en.wikipedia.org/wiki/AVIF Example: page.10 = IMAGE page.10 { file = GIFBUILDER file { backColor = yellow XY = 1024,199 format = avif speed = 8 quality = 44 10 = IMAGE 10.offset = 10,10 10.file = 1:/my-image.jpg } } Resolves: #102353 Releases: main Change-Id: Ibb0697f1c7120ba596ac94f31e51d4863c3999b3 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81712 Tested-by: core-ci <[email protected]> Tested-by: Garvin Hicking <[email protected]> Tested-by: Stefan Bürk <[email protected]> Reviewed-by: Stefan Bürk <[email protected]> Reviewed-by: Garvin Hicking <[email protected]>
- Loading branch information
Showing
10 changed files
with
148 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
...ion/Changelog/13.3/Feature-102353-AVIFSupportForImagesGeneratedByGIFBUILDER.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
.. include:: /Includes.rst.txt | ||
|
||
.. _feature-102353-1699523309: | ||
|
||
================================================================== | ||
Feature: #102353 - AVIF support for images generated by GIFBUILDER | ||
================================================================== | ||
|
||
See :issue:`102353` | ||
|
||
Description | ||
=========== | ||
|
||
GIFBUILDER, the image manipulation library for TypoScript based on GDlib, a PHP | ||
extension bundled into PHP, now also supports generating resulting files of | ||
type "avif". | ||
|
||
AVIF is an image format, that is supported by most modern browsers, and usually | ||
has a better compression (= smaller file size) than jpg files. | ||
|
||
.. important:: | ||
|
||
Before using this feature, please check whether the used operating system | ||
actually supports de/encoding AVIF files. Especially Debian 11 (Bullseye) | ||
and older or systems forked from that may lack AVIF support. | ||
|
||
Impact | ||
====== | ||
|
||
If defined via format=avif within a GifBuilder setup, the generated files are | ||
now AVIF files instead of png (the default). | ||
|
||
It is possible to define the quality of a AVIF image similar to jpg images | ||
globally via :php:`$TYPO3_CONF_VARS['GFX']['avif_quality']` or via TypoScript's | ||
"quality" property on a per-image basis. Via TypoScript it is also possible | ||
to use the new property "speed" - see https://www.php.net/manual/en/function.imageavif.php | ||
for more details. | ||
|
||
Example | ||
------- | ||
|
||
.. code-block:: typoscript | ||
page.10 = IMAGE | ||
page.10 { | ||
file = GIFBUILDER | ||
file { | ||
backColor = yellow | ||
XY = 1024,199 | ||
format = avif | ||
quality = 44 | ||
speed = 1 | ||
10 = IMAGE | ||
10.offset = 10,10 | ||
10.file = 1:/my-image.jpg | ||
} | ||
} | ||
A new test in the Environment module / Install Tool can be used to check if the | ||
bundled GDlib extension of your PHP version supports the AVIF image format. | ||
|
||
.. index:: Frontend, TypoScript, ext:frontend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file added
BIN
+12.2 KB
typo3/sysext/install/Resources/Public/Images/TestReference/Gdlib-box.avif
Binary file not shown.