mirror of
https://github.com/php/php-src.git
synced 2026-03-24 16:22:37 +01:00
Some AVIF image generators didn't include the PixelInformationProperty (pixi), even though strictly speaking they should. In v0.9.2, libavif began requiring this. Let's disable it so we can read those images too. We also remove xfail from test on FreeBSD. Closes GH-7253.
30 lines
757 B
PHP
30 lines
757 B
PHP
--TEST--
|
|
imagecreatefromstring() - AVIF format
|
|
--EXTENSIONS--
|
|
gd
|
|
--SKIPIF--
|
|
<?php
|
|
if (!(imagetypes() & IMG_AVIF)) {
|
|
die('skip AVIF support required');
|
|
}
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
echo "Reading image whose major brand is 'avif':\n";
|
|
$im = imagecreatefromstring(file_get_contents(__DIR__ . '/imagecreatefromstring_major_brand.avif'));
|
|
var_dump(imagesx($im));
|
|
var_dump(imagesy($im));
|
|
|
|
echo "Reading image with a compatible brand that's 'avif':\n";
|
|
$im = imagecreatefromstring(file_get_contents(__DIR__ . '/imagecreatefromstring_compatible_brand.avif'));
|
|
var_dump(imagesx($im));
|
|
var_dump(imagesy($im));
|
|
?>
|
|
--EXPECT--
|
|
Reading image whose major brand is 'avif':
|
|
int(250)
|
|
int(375)
|
|
Reading image with a compatible brand that's 'avif':
|
|
int(480)
|
|
int(270)
|