diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000000000..6691742698ba8 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,68 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "PHP aviftest", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/sapi/cli/php", + "args": ["../play/php/aviftest.php"], + "stopAtEntry": false, + "cwd": "${workspaceFolder}", + "environment": [], + "externalConsole": false, + "MIMode": "lldb" + }, + { + "name": "getimagesize", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/sapi/cli/php", + "args": ["../play/php/getimagesize.php"], + "stopAtEntry": false, + "cwd": "${workspaceFolder}", + "environment": [], + "externalConsole": false, + "MIMode": "lldb" + }, + { + "name": "imagecreatefromstring_avif", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/sapi/cli/php", + "args": ["ext/gd/tests/imagecreatefromstring_avif.phpt"], + "stopAtEntry": false, + "cwd": "${workspaceFolder}", + "environment": [], + "externalConsole": false, + "MIMode": "lldb" + }, + { + "name": "Web-Pee", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/sapi/cli/php", + "args": ["ext/gd/tests/imagecreatefromstring_webp.phpt"], + "stopAtEntry": false, + "cwd": "${workspaceFolder}", + "environment": [], + "externalConsole": false, + "MIMode": "lldb" + }, + { + "name": "avif_decode_encode", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/sapi/cli/php", + "args": ["ext/gd/tests/avif_decode_encode.phpt"], + "stopAtEntry": false, + "cwd": "${workspaceFolder}", + "environment": [], + "externalConsole": false, + "MIMode": "lldb" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000000..b3fb208794105 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "C_Cpp.dimInactiveRegions": false +} \ No newline at end of file diff --git a/ext/gd/libgd/gd_avif.c b/ext/gd/libgd/gd_avif.c index 01bcbf14abdb8..c0819283a7edf 100644 --- a/ext/gd/libgd/gd_avif.c +++ b/ext/gd/libgd/gd_avif.c @@ -342,6 +342,14 @@ gdImagePtr gdImageCreateFromAvifCtx (gdIOCtx *ctx) decoder = avifDecoderCreate(); + // Check if libavif version is >= 0.9.1 + // If so, allow the PixelInformationProperty ('pixi') to be missing in AV1 image + // items. libheif v1.11.0 or older does not add the 'pixi' item property to + // AV1 image items. (This issue has been corrected in libheif v1.12.0.) +#if AVIF_VERSION >= 90100 + decoder->strictFlags &= ~AVIF_STRICT_PIXI_REQUIRED; +#endif + io = createAvifIOFromCtx(ctx); if (!io) { gd_error("avif error - Could not allocate memory"); diff --git a/ext/gd/tests/imagecreatefromstring_avif.phpt b/ext/gd/tests/imagecreatefromstring_avif.phpt index 98ba5acaaa9dc..987b538c5fbcb 100644 --- a/ext/gd/tests/imagecreatefromstring_avif.phpt +++ b/ext/gd/tests/imagecreatefromstring_avif.phpt @@ -7,9 +7,6 @@ gd if (!(imagetypes() & IMG_AVIF)) { die('skip AVIF support required'); } -if (str_contains(PHP_OS, "FreeBSD")) { - die("xfail Currently failing on FreeBSD CI"); -} ?> --FILE--