php-src/ext/gd/tests/gif2jpg.phpt
Christoph M. Becker a375d54785
Migrate skip checks to --EXTENSIONS-- for ext/gd
Cf. PR #6787.

Closes GH-6994.
2021-05-22 15:38:51 +02:00

26 lines
551 B
PHP

--TEST--
gif --> jpeg conversion test
--EXTENSIONS--
gd
--SKIPIF--
<?php
if (!function_exists("imagejpeg")) {
die("skip jpeg support unavailable");
}
if (!function_exists("imagecreatefromgif")) {
die("skip gif read support unavailable");
}
?>
--FILE--
<?php
$cwd = __DIR__;
echo "GIF to JPEG conversion: ";
echo imagejpeg(imagecreatefromgif($cwd . "/conv_test.gif"), $cwd . "/test_gif.jpeg") ? 'ok' : 'failed';
echo "\n";
@unlink($cwd . "/test_gif.jpeg");
?>
--EXPECT--
GIF to JPEG conversion: ok